I am looking for a quick way to select all rows on the client. I am using the following function and it seems very slow.
function checkAll() { var grid = $find("WebDataGrid1"); var rows = grid.get_rows(); var selection = grid.get_behaviors().get_selection(); var selectedRows = selection.get_selectedRows(); var rowCount = rows.get_length();
grid.beginUpdate(); for (var i = 0; i < rowCount; i++) { var row = rows.get_row(i); selectedRows.add(row); } grid.endUpdate(); }
Any help would be greatly appreciated.
Which browser it is used in and how many rows are in the grid? Thanks.
IE 8 in IE 7 compatibility mode, 321 rows of two column data with one column hidden.