Load Full Grid

3 replies. Last post: March 10, 2010 9:27 PM by Andi Santoso
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Mark DavisonMember

Hi,

We are changing our grid to work in ClassicPaging mode from VirtualLoad. We have a grid which have a checkbox column. We have included a "Check All" button on the client which used to use some JavaScript code to load all the records in the grid and checked all the check boxes.

Since we have changed to ClassicPaging this no longer works.

The JavaScript used when the user clicks our "Check All" checkbox is as follows:

function Checked() { var grid = ISGetObject("WebGrid1"); if(grid.TotalLoadedRows<grid.TotalRows) { wgLoadMore("WebGrid1"); setTimeout(function() {Checked();},100) } else { var chkBox = grid.RootTable.GetElement(WG40.COLHEADER, WG40.HTMLTABLE).childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0]; var ischecked=chkBox.checked; for(i=0;i<grid.TotalRows;i++)

grid.RootTable.GetRow(i).GetCell(0).GetElement().childNodes[0].checked = ischecked;

}

 

The problem seems to be that in this mode, TotalLoadedRows and TotalRows always seems to be the same i.e. the number of rows in each page.

Can anyone tell me how I can programmatically load all the records then manually check all the checkboxes?

We are using version 7.0.7200.301.

Regards,

Mark

All times are GMT -5. The time now is 2:06 PM.
Previous Next