Javascript method of accessing grid rows
Posted: Wed May 23, 2012 11:56 am
I am working with a grid which has a checkbox to select rows for subsequent processing. The user can check multiple rows.
I am trying to use some javaScript to display a count of the number of grid rows which have been selected.
I have tried using the following code associated with the checkbox's onChange event:
The code only works when the user is on page one. When on page two 'SELEC.1' is undefined.
Is there a way of accessing information on rows which have been sent to the browser but aren't on the current page? or do you have an alternate suggestion?
I am trying to use some javaScript to display a count of the number of grid rows which have been selected.
I have tried using the following code associated with the checkbox's onChange event:
Code: Select all
var nbrChecked = 0;
var row = 1;
while (getObj('SELEC.'+row)){
if (getObj('SELEC.'+row).checked==true){
nbrChecked++;
}
row++;
}
changeElementValue("selecCount", nbrChecked);
Is there a way of accessing information on rows which have been sent to the browser but aren't on the current page? or do you have an alternate suggestion?