Display "(NULL)" in datagrid even when the NULL background color is activated. The (NULL) text is helpful in any case. Fixes bug #832

This commit is contained in:
Ansgar Becker
2008-10-31 18:24:30 +00:00
parent 6b1151839d
commit ee168d5a5e

View File

@ -5622,10 +5622,7 @@ begin
if Node.Index >= Cardinal(Length(gr.Rows)) then Exit;
c := @gr.Rows[Node.Index].Cells[Column];
EditingCell := Sender.IsEditing and (Node = Sender.FocusedNode) and (Column = Sender.FocusedColumn);
if prefEnableNullBG and (c.IsNull or c.NewIsNull) then begin
// Don't display any text if NULL background was activated. In most cases better readable
CellText := '';
end else if c.Modified then begin
if c.Modified then begin
if c.NewIsNull then begin
if EditingCell then CellText := ''
else CellText := TEXT_NULL;