Subject RE: [IBO] Howto iterate through all selected rows
Author Riho-Rene Ellermaa
Hope this helps. That's what I do

XX::StartAction(int type)
{
...
TStringList *StringList=new TStringList();
if(StringList->Count==0) // if nothing is selected then action is done on
current record
{ DSource->Dataset->InvalidateRowNum(DSource->Dataset->RowNum);
switch(type)
{ case 1: // Accept
FAccept();
break;
case 2: // remove accept
FPrepare();
break;
}
}
else // if user has selected some rows
{ for(int i=StringList->Count-1;i>=0;i--)
{ DSource->Dataset->Bookmark=StringList->Strings[i];
DSource->Dataset->InvalidateRowNum(DSource->Dataset->RowNum);
switch(type)
{ case 1: // Accept
if(DSource->Dataset->FieldByName("STATUS")->AsInteger==1 ||
DSource->Dataset->FieldByName("STATUS")->AsInteger==3 )
FAccept();
break;
case 2: // remove accept
FPrepare();
break;
}
}
}
}
}


Riho-Rene Ellermaa
senior programmer
Hansabank

-----Original Message-----
From: mirco@... [mailto:mirco@...]
Sent: Thursday, November 22, 2001 1:23 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Howto iterate through all selected rows


Thank you, but this does not answer my question. I was asking how to
iterate through all *selected* rows... the ones that the user clicked
in a grid with multi-select. Those rows have the Selected[] property
set.

Mirco



Yahoo! Groups Sponsor

<http://rd.yahoo.com/M=212180.1701098.3252983.1269402/D=egroupweb/S=17050071
83:HM/A=812074/R=0/*http://www.verisign.com/cgi-bin/go.cgi?a=b15334027000300
0>

<http://us.adserver.yahoo.com/l?M=212180.1701098.3252983.1269402/D=egroupmai
l/S=1705007183:HM/A=812074/rand=555381031>

___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com <http://www.ibobjects.com> - your IBO community
resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .




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