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
375
Check All Checkbox in header template giving performance issues(Large amount of data)
posted

We are using infragistics v10.3 webdatagrid which has 76 columns & 3000 rows.

We have check all checkbox in the header template. On its selection system is throwing following error(Stop running this script?)

For check all checkbox in the header template we have written following javascript function:

function CheckAllItems(checkbox) {

                var grid = $find("<%gridname %>");

                for (var i = 0; i < grid.get_rows().get_length(); i++) {

                    var row = grid.get_rows().get_row(i);

                    var cell = row.get_cell(0);

                    var element = cell.get_element();

                    element.children[0].checked = checkbox.checked;

                    if (checkbox.checked)

                        grid.get_behaviors().get_selection().get_selectedRows().add(row);

                    else

                        grid.get_behaviors().get_selection().get_selectedRows().remove(row);

                }

            }

      We suspect the below lines are taking time in the function-

 

              grid.get_behaviors().get_selection().get_selectedRows().add(row);

  grid.get_behaviors().get_selection().get_selectedRows().remove(row);

 

            Kindly suggest an alternative.