Select all rows on all pages


i habe a grid with 400 rows on 8 pages (50 rows on a page).
Furthermore i have a html-button that calls the following function to select or deselect all rows in the grid.

function checkAllRows(state)
var all = obj.getProperty('row/values');
obj.setProperty('selection/values', (state? all:[]));

The function selects all rows on page 1. But if i change to page 2 or 3,
no rows are selected on this pages.

What can i do?

July 15,
Anyone have any insight on this? I'm doing the same thing and need all items on all pages to be selected.

September 14,
Nick, (ALL),
I finally fiogured this one out. if you look at the array returned by the obj.getProperty('row/values'); you'll see that only the rows that exist on that page are returned. So, track your total row count (from all pages) and build an array to pass to obj.setProperty('selection/values' array); (or obj.setSelectionValues()) that contains any rows from all of the pages that you want selected. Here's some code:

var aIds = ['1','2','3','400','401','402'];

function Grid_SelectAll(aIds)

function Grid<%= instId %>_SelectNone()
September 14,
I have seen people doing this before selecting all rows why don't you just change the style of the unselected row to the selected row it will be alot faster

Obviously you need a flag in your code to say you have selected all
September 16,

This topic is archived.

See also:

Back to support forum