cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting all rows currently visible in the table

Former Member
0 Kudos

Hi ,

we need to add the "Select all" functionality for the a table used in one of the screens. The examples I have found for this would select all the elements of the node bound to the table. However, we need to select only those elements which are presently visible on the screen, which would change if the user presses the previous or next button.

Please guide me on how it can be possibly done .

Edited by: Dhruwat Bhagat on Dec 28, 2007 11:45 AM

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Hi Dhruawat,

Modify the example functionality SelectAll like this:

Create visRow context attribute of type int. Bind this to firstVisibleRow property of table.

Check visibleRowCount value (default is 5)

//for loop on the table node

for(int i=visRow ;i<(visRow + visibleRowCount value );i++)

{

select the element;

}

// end of for loop

regards,

Siva

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

1. Assign visiblerowcount with some integer value. say count.

2. for(int i=0;i<count; i++)

{

node.setSelected(i,true);

}