Topic: Counter reset

Hello Dimitri ...

A question. After doing a search and showing the results in a grid, this tells me the amount of results obtained. I want to have a button that when I pass the instruction "frmMain.TableGrid1.ClearRows;" This will erase the results of the grid and I will initialize the counter at 0.


How to do it?

Re: Counter reset

procedure frmMain_ClearButton_OnClick (Sender: string; var Cancel: boolean);
begin
    frmMain.TableGrid1.ClearRows;
    frmMain.TableGrid1.Columns[0].Footer.Caption := '0';
end;

Re: Counter reset

Thanks you ehwagner, It's what I need