Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

A query about DBGrid ??

Hi all,

I am working on a database application in wich i used DBGrid.
I have more than thousand records in my grid. & i have to select all those records. The multi-select property of DBGrid is true. But it is not sufficient. I want the feature like 'Ctrl-A' to select all records in DBGrid.

Is anybody have any idea about it?
Thanks in advance.

Comments

  • zibadianzibadian Member Posts: 6,349
    : Hi all,
    :
    : I am working on a database application in wich i used DBGrid.
    : I have more than thousand records in my grid. & i have to select all those records. The multi-select property of DBGrid is true. But it is not sufficient. I want the feature like 'Ctrl-A' to select all records in DBGrid.
    :
    : Is anybody have any idea about it?
    : Thanks in advance.
    :
    This is a straight-forward, blunt method, but it should work. You can loop through all the records using TDataSet.Next, and then for every record set the TDBGrid.SelectedRows.CurrentRowSelected to true. This should select every record. This procedure can be placed in the OnKeyUp() to be called at the specified keypress.
Sign In or Register to comment.