From: <ah...@us...> - 2008-10-24 20:49:03
|
Revision: 11980 http://jvcl.svn.sourceforge.net/jvcl/?rev=11980&view=rev Author: ahuser Date: 2008-10-24 20:48:58 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Mantis #4551: TJvCheckBox, DataConnector: If Field is null, Checkbox is Checked Modified Paths: -------------- trunk/jvcl/run/JvCheckBox.pas Modified: trunk/jvcl/run/JvCheckBox.pas =================================================================== --- trunk/jvcl/run/JvCheckBox.pas 2008-10-24 20:42:46 UTC (rev 11979) +++ trunk/jvcl/run/JvCheckBox.pas 2008-10-24 20:48:58 UTC (rev 11980) @@ -197,7 +197,10 @@ if Field.IsValid and (ValueChecked <> '') and (ValueUnchecked <> '') then begin FCheckBox.ReadOnly := not Field.CanModify; - FCheckBox.Checked := AnsiCompareText(Field.AsString, ValueUnchecked) <> 0; + if not Field.IsNull then + FCheckBox.Checked := AnsiCompareText(Field.AsString, ValueUnchecked) <> 0 + else + FCheckBox.State := cbGrayed; end else begin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |