Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
455
Quick way to select all rows on the client
posted

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.

 

 

 

Parents
No Data
Reply Children