Hello Boki,
I solved it.
The little example project worked. So I looked at the differencs and I found, that I had set BufferRecords = false.
With BufferRecords = True it works.
And there is still a question left to this subject:
How do I find out about the size for TNxCheckBoxColumn6 what it needs to display?
See the code below. It loops over all rows anc columns to find out the display width in order to set the width of the column correctly
Thanks for being there
Lothar
for Col := 0 to aNextGrid.Columns.Count - 1 do
begin
if aNextGrid.Columns[Col].Visible then
begin
for Row := 0 to aNextGrid.RowCount - 1 do
begin
if aNextGrid.Columns[Col] is TNxButtonColumn6 then
lng := TNxButtonColumn6(aNextGrid.Columns[Col]).ButtonWidth
else
if aNextGrid.Columns[Col] is TNxCheckBoxColumn6 then
lng := TNxCheckBoxColumn6(aNextGrid.Columns[Col]). ?????????
else
if aNextGrid.Columns[Col] is TNxGraphicColumn6 then
begin
Graphic := TNxGraphicColumn6(aNextGrid.Columns[Col]).GetGraphic(aNextGrid.Cell[Col, Row], Col, Row);
if Assigned(Graphic) then
lng := Graphic.Width
else
lng := 0;
end
else
if aNextGrid.Columns[Col] is TNxIconColumn6 then
begin
if TNxIconColumn6(aNextGrid.Columns[Col]).Index >=0 then
begin
Icon := TIcon.Create;
try
TNxIconColumn6(aNextGrid.Columns[Col]).Images.GetIcon(TNxIconColumn6(aNextGrid.Columns[Col]).Index, Icon);
lng := Icon.Width;
finally
Icon.Free;
end;
end
else
lng := 0;
end
else
lng := GetTextWidth(aNextGrid.Columns[Col].Font, aNextGrid.Columns[Col].GetDisplayText(aNextGrid.Cell[Col, Row], Col, Row));