Subject Re: [IBO] Determining Count of Selected Records
Author Lucas Franzen
Campbell Fuller schrieb:
>
> I'm missing something somewhere - how do I determine the number of
> records/rows selected from a TIB_GRID?
>
> I know how to run throught the dataset and determine whether or not a row
> has been selected but don't know what property (if any) to use to determine
> the total selected.
>
> I use this for reporting purposes where a user will select a Quote or
> multiplie quotes to print. If none are selected I default to the current
> row, if ALL are selected I will change the SQL to select all quotes for a
> given customer.

Quick'n'dirty:

var sl: TStringList;
begin
sl := TStringList.Create;
myQuery.SelectedBookmarks ( sl );
ShowMessage ( 'You selected ' + IntToStr ( sl.Count ) + ' Records' );
sl.Free;
end;

Luc.