Subject | RE: [IBO] Selected rows of IB_Grid |
---|---|
Author | Dmitry Beloshistov |
Post date | 2010-08-03T13:40:28Z |
Hello, Alexandre!
Some around it:
Var QData:TIB_Query;
S:=QData.Bookmark; // save position in grid
QData.DisableControls;
L:=TStringList.Create; // temporary string list
try
QData.SelectedBookmarks(L); // get selected
for i:=0 to Pred(L.Count) do
begin
QData.Bookmark:=L.Strings[i]; // go to next selected row
MyData:=QData.FieldByName('MYDATAFIELD').AsInteger; // get data
QData.Selected[QData.RowNum]:=False; // clear selection for row
end;
finally L.Free; end; // free temporary string list
QData.Bookmark:=S; // go to previos save position
QData.EnableControls;
WBR, Dmitry Beloshistov AKA [-=BDS=-]
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of alexandrepires2007
Sent: Tuesday, August 03, 2010 4:00 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] Selected rows of IB_Grid
Hi Guys,
How to get the field values of only selected rows of a TIB_GRID ?
I am using delphi 7
Thanks
Alexandre
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5336 (20100803) __________
The message was checked by ESET NOD32 Antivirus.
http://www.esetnod32.ru/.ml
[Non-text portions of this message have been removed]
Some around it:
Var QData:TIB_Query;
S:=QData.Bookmark; // save position in grid
QData.DisableControls;
L:=TStringList.Create; // temporary string list
try
QData.SelectedBookmarks(L); // get selected
for i:=0 to Pred(L.Count) do
begin
QData.Bookmark:=L.Strings[i]; // go to next selected row
MyData:=QData.FieldByName('MYDATAFIELD').AsInteger; // get data
QData.Selected[QData.RowNum]:=False; // clear selection for row
end;
finally L.Free; end; // free temporary string list
QData.Bookmark:=S; // go to previos save position
QData.EnableControls;
WBR, Dmitry Beloshistov AKA [-=BDS=-]
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of alexandrepires2007
Sent: Tuesday, August 03, 2010 4:00 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] Selected rows of IB_Grid
Hi Guys,
How to get the field values of only selected rows of a TIB_GRID ?
I am using delphi 7
Thanks
Alexandre
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5336 (20100803) __________
The message was checked by ESET NOD32 Antivirus.
http://www.esetnod32.ru/.ml
[Non-text portions of this message have been removed]