Subject Re: [IBO] Need help to find out the current selection of an IB_Grid
Author Jason Wharton
> I have an application where I want to copy data between two grids.
> However, that is only possible when a record is selected in a grid.
> How can I find out if that is the case?

Use the Selected[] property of the dataset and use the RowNum to see if the
current row is selected. You can also populate a string list with bookmarks
of multi-selected records and then work through the list of them and copy
the records from one dataset to the other.

> Right now, I have a clumsy solution that assumes if no record is selected,
> all the fields (including primary key) are NULL:

This should not be used since a dataset tends to stay on a record whether it
is selected or not.

> function TVaardigheidSoortDataModule.IsVaardigheidNiveauAvailable:
> begin
> Result := not VaardigheidNiveauIB_Query.FieldByName('ID').IsNull;
> end;

Jason Wharton
CPS - Mesa AZ