Multiple Grid rows processin

Rayxue

Well Known Member
Hi All,

Assume I have 10 rows be selected through QBE or FC value, then I put check mark on row 2,3 and 5 (no fourth one), how can I find these 3 GC records ? I can use "Get Selected Row Count" to find 3 records be checked, and by "Get Selected Row Number" to get 2 which is first row be checked, but since these checked records with gap (fourth not be checked), so how can I find row 5 and void row 4 be chose ?

Also I don't know how to use "Get Next Selected Row".

Thanks for any advise
Raymond
 
Hi.

What I do is to use a hidden EV01 field in the grid to mark Selected / Unselected (1 / 0) then use this GC value to work on the grid
 
Hi All,

Correct me if iam wrong,

We have a option repeat for grid in the button clicked event.

Using while to select the selected grid rows.

First select the total selected grid rows count using function.

the while loop is based on the count of the selected rows.

decrement the count in the while loop and get the next selected row.

May be it will help you.

Thanks
Naveen
 
Another option is to make the grid 'Multiple Selection' and in the Event Rules for your row exit, there is an option in the 'Options' menu for 'Repeat for Grid'. The code will be repeated for each selected row.
 
Naveen,

Doing that way, fourth row (not be selected) will be processed and row 5 may be misssed. Double check if you code it.

Thanks
Ray
 
Hi all.

Just to make sure we have an example for this system function in this useful website.

//
Get Selected Grid Row Count(FC Grid, VA frm_iSelectedRows_INT01)
//
Get Selected Grid Row Number(FC Grid, VA iCurrentSelectedRow_INT01)
//
While VA frm_iSelectedRows_INT01 is greater than <Zero>
//
Get Grid Row (FC Grid, VA iCurrentSelectedRow_INT01)
//
Get Next Selected Row(FC Grid, VA iCurrentSelectedRow_INT01, VA iCurrentSelectedRow_INT01)
//
VA frm_iSelectedRows_INT01 = [VA frm_iSelectedRows_INT01]-1
End While
//

Regards

Luis Marcelo
E811
 
Thanks

Thanks your example useful even today after 9 years.

Hi all.

Just to make sure we have an example for this system function in this useful website.

//
Get Selected Grid Row Count(FC Grid, VA frm_iSelectedRows_INT01)
//
Get Selected Grid Row Number(FC Grid, VA iCurrentSelectedRow_INT01)
//
While VA frm_iSelectedRows_INT01 is greater than <Zero>
//
Get Grid Row (FC Grid, VA iCurrentSelectedRow_INT01)
//
Get Next Selected Row(FC Grid, VA iCurrentSelectedRow_INT01, VA iCurrentSelectedRow_INT01)
//
VA frm_iSelectedRows_INT01 = [VA frm_iSelectedRows_INT01]-1
End While
//

Regards

Luis Marcelo
E811
 
Hi,

The Best way to do this job by using Flag DD Item in the Grid for the selected mark it 'Y' , and unselected column 'N'.

While process all the row we can identify the rows.

Regards
Ramashankar
 
Back
Top