TMSFNCDataGrid RealToDisplay after filter

RealToDisplay works fine when sorting the entire grid.

After filtering the remaining rows do have wrong RealToDisplay results…

Filtered rows keep the RealToDisplay number they had before filtering.

Hi,

I’ve looked into this issue and fixed it. Next version of TMS FNC UI Pack addresses the issue, thanks for pointing out!.

Would you also get the alternating row colors issue fixed?

This should already be handled.

Alternating row colors are not working with filtered grid data.

I am using code like this snipped:

procedure TfrmGridFilter.GridGetCellLayout(Sender: TObject; ACell: TTMSFNCDataGridCell);
begin
if ACell.Row>0 then
begin
if (ACell.Row mod 2)=0 then
begin
ACell.Layout.Fill.Color:=clYellow;
end
else
begin
ACell.Layout.Fill.Color:=clBlue;
end;
end;
end;

Hi,

The row index remains the same even though you filter or hide rows.

When testing I found out after sorting:

Grid.Cells[AColumn,ARow]:=’Test’ writes in DisplayRow not in RealRow.

That causes big damage in the grid row data…

Yes that’s by design, sorting only moves the data, but the indexing remains the same. If you want to find out where the original row is located you can use:

TMSFNCDataGrid1.Cells[0, TMSFNCDataGrid1.RealToDisplayRow(3)] := 'Test';

RealToDisplayRow(ARow) is an unknown function in TMSFNCDataGrid (or am I missing classes)?

Woops, we have exposed this, but this hasn’t made the release yet, pleas use

TMSFNCDataGrid1.Root.RealToDisplayRow(3)

It seems I have a lot more under control now - except sorting filtered rows.

In that case DispRow is wrong…

Correct, this is a fix that’s still needs to be released. filtering didn’t properly adapt the display index for the rows.

Issue is still not fixed in latest version…

(I can not deliver apps to customers)

Can you provide a simple test case, what you expect and which code you are using so we can investigate?