Subject RE: [IBO] SelectedBookmarks and SelectAll Problem
Author Riho-Rene Ellermaa
I'm also using this line:

(dynamic_cast<TIB_BDataset*>(DSource->Dataset))->SelectAll(true);

and tried with IBO4.2Fb it works OK. (of course it was small dataset - 10 records)

for(int i=StringList->Count-1;i>=0;i--)
{ DSource->Dataset->Bookmark=StringList->Strings[i];
DSource->Dataset->InvalidateRowNum(DSource->Dataset->RowNum);
FDelete();
}


Riho-Rene Ellermaa
senior programmer
Hansabank

-----Original Message-----
From: mircostange [mailto:mirco@...]
Sent: Friday, February 22, 2002 9:58 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] SelectedBookmarks and SelectAll Problem


Hi Everyone,

My application displays the results of a query in a TIB_Grid control.
The user can select (mark) rows either with the grid's Ctrl+Click
feature or press some button to select all rows (which calls SelectAll
(true)).
After that, the user can perform various operations on the selected
rows, e.g delete them. The code for this is pretty straight forward:

s := TStringList.create();
q.selectedBookmarks(s);
q.setFocus;
for i := 0 to s.count-1 do begin
q.Bookmark := s.strings[i];
{ do whatever ... }
end;
s.free;

However, the problem with this approach seems to be that if the user
selects all rows directly when the app is started (i.e. without
scrolling through the grid), selectedBookmarks returns an empty list.

Is this a known issue? Any workarounds?

Mirco




[Non-text portions of this message have been removed]