Hi,
Using TAdvStringGrid. I've added event OnGetDisplText like this:
procedure TForm2.ConfigGridGetDisplText(Sender: TObject; ACol, ARow: Integer; var Value: string);
const
ynStr : array[Boolean] of String = ('No', 'Yes');
begin
if ARow > 0 then
case ACol of
1 : Value := MyList[ARow - 1].Name;
2 : Value := ynStr[MyList[ARow - 1].Running];
end;
end;
And then I've added a filter where
Column := 2;
Condition := 'Yes';
Data := fcVirtual;
Method := fmLiteral;
When FilterActive := True, the Grid.RowCount is reduced to only the number of items in MyList where the Running property = True, but the items displayed in the grid are still incremental.
eg. If I have 3 items in my list, and
- item[0].Running = True
- item[1].Running = False
- item[2].Running = True
What am I doing wrong?
Thanks for your help.