Board index » delphi » TDBGrid Selection

TDBGrid Selection

If you set the TDBGrid so the user can select the entier row, the property
"SelectedField" always returns nil (according to the help file).

How do I now then what row thid the user select?

thanks a lot.
Julian.

 

Re:TDBGrid Selection


Hi Julian!
Property SelectedField tells you wich column is selected. If you've
set the grid so the user can select the entier row then it's natural
that SelectedField returns nil since all columns are selected.
The current record in the DataSet that the grid controls is
automatically moved when user select a gridrow.
/ Ingemar Magnusson, Oxel?sund, Sweden

Julian Sanchez skrev i meddelandet
<01bd23b4$74152470$0b02a8c0@nostromo>...

Quote
>If you set the TDBGrid so the user can select the entier row, the
property
>"SelectedField" always returns nil (according to the help file).
>How do I now then what row thid the user select?

Re:TDBGrid Selection


Hi,

try to do this: DBGrid1.SelectedRows

it's a TBookmarkList. Check the source for more info...

Martijn Tonies
http://surf.to/seal97

Julian Sanchez <jul...@w-bin.com> wrote in article
<01bd23b4$74152470$0b02a8c0@nostromo>...

Quote
> If you set the TDBGrid so the user can select the entier row, the
property
> "SelectedField" always returns nil (according to the help file).

> How do I now then what row thid the user select?

> thanks a lot.
> Julian.

Other Threads