FNCGrid strange behavior (Android)

Hi to all,
after solved my problem with "rows color" here a new one.
Delphi 10.3, last FNC Version, compiled for Android and run on Samsung S10 + (Android V. 10)

Grid selection as default, the only changes (in object inspector) are

FNCGrid.Option.Selection:=smSingleRow
FNCGrid.Option.Editing.Enabled:=False

in order to have the selected row all highlated.
What happend, when scroll the grid, is that the selected row is partial highlated (often only the first cell is selected), somtime the old selected row reamin highlated as the new one.
A very strange bheaviour.
Due the fact i'm not able to explain better, i tryed to make a "video" on my device.
Hope this can explain better what happend ..

Best regard

Daniele

FNCGrid Strange Behavior.zip (3.8 MB)

can you try initializing the grid by setting the rowcount in the constructor?

Hi Pieter,
thank you for reply .... and sorry for my delay in reply.

I initialize the grid in form create with (SG! is FNCGrid)

SG1.Clear;
SG1.ColumnCount:=11;
SG1.RowCount:=1;

Row count is 1 because i have to show the grid header and i have to wait thwe query result.
In another procedure (called in oncreate form event) i execute the grid and i fill the grid with
(where MF.XDS1 is TXDataSet)

Idx:=0;
while not MF.XDS1.Eof do // After runned query
begin
Inc(Idx)
SG1.InsertRow(1); // Inser a new row... in first position
SG1.Cells[1,1]:='Test Row ' + IntToStr(Idx);
// ... continue to fill the grid with row alignment and so on ..
MF.DXS1.Next
End;

The query gives a dataset alreay sorted.

I will try fo assign to the grid the rows number i need and work on a "preared" rows .... but i don't know if this can resolve the problem ... i'll try in the afternoon ...

If you have any other suggestions ... i'm glad to follow it

Thank's for all,

Daniele

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.