i'va had this problem and found a solution i want to share with you.
In case you use KaDao for Access database the memo fields content is shown as [MEMO] in grid column.
it's not a problem of NxDbGrid itself because with other database it's ok but the change is needed in it because other Grids show the correct values.
the solution is to read, in case of memo field, the text and not the displaytext from field:
in file NxDbGrid.pas
in function TNextDBGrid.GetCellInfo(ACol, ARow: Integer): TCellInfo;
change from
CODE
{ Set DisplayText }
if DataField.IsNull then DisplayText := Columns[ACol].NullText else
begin
if DataType = ftWideString then DisplayText := TWideStringField(DataField).Value
else DisplayText := DataField.DisplayText;
end;
end;
if DataField.IsNull then DisplayText := Columns[ACol].NullText else
begin
if DataType = ftWideString then DisplayText := TWideStringField(DataField).Value
else DisplayText := DataField.DisplayText;
end;
end;
to
CODE
{ Set DisplayText }
if DataField.IsNull then DisplayText := Columns[ACol].NullText else
begin
case DataType of
ftWideString: DisplayText := TWideStringField(DataField).Value;
ftMemo: DisplayText := DataField.AsString
else DisplayText := DataField.DisplayText;
end;
end;
if DataField.IsNull then DisplayText := Columns[ACol].NullText else
begin
case DataType of
ftWideString: DisplayText := TWideStringField(DataField).Value;
ftMemo: DisplayText := DataField.AsString
else DisplayText := DataField.DisplayText;
end;
end;
that's all .
bye
Fabio