CRDBGrid SelectAll
Posted: Mon 26 May 2008 09:49
Hi,
I use the CRDBGrid in many of our application, and I'm very happy with them.
Theres just one problem with selecting rows.
When you want to select all records there is no method for it.
So I handle "CTRL+A" to execute following code:
If you have only a small count of rows this work pretty good, but if you have greater tables, as it is in the most of our projects, the method case to scroll down the complete table and handle each row.
So in a normal project of us I counted such a selectall of 20sec for just about 7000 rows, wich is definitely to long.
May you can me provide a better solution or integrate a selectall method in the CRDBGrid?
I'm using:
Delphi 7.0 with MyDac 5.50.0.34
Best regards,
Karsten Hansske
I use the CRDBGrid in many of our application, and I'm very happy with them.
Theres just one problem with selecting rows.
When you want to select all records there is no method for it.
So I handle "CTRL+A" to execute following code:
Code: Select all
MyQry.First;
while not MyQry.Eof do
begin
Grid.SelectedRows.CurrentRowSelected := true;
MyQry.Next;
end;
So in a normal project of us I counted such a selectall of 20sec for just about 7000 rows, wich is definitely to long.
May you can me provide a better solution or integrate a selectall method in the CRDBGrid?
I'm using:
Delphi 7.0 with MyDac 5.50.0.34
Best regards,
Karsten Hansske