1

I'm trying to bind to a checkbox click as described in title because I have a dynamic grid, which is pageable, and has a "select all" checkbox in the header. However, when fetching data for the grid, the select all checkbox in the header always gets replaced, so I can't bind to it directly. I've tried the following:

var selectAllBox = $("#ItemSelectionGrid").find('thead').find('.k-checkbox');
selectAllBox.on("click", onSelectAllClick);

I'm just wondering if I could do something like:

$('#ItemSelectionGrid').on('click', 'some way to select the descendent checkbox', onSelectAllClick);

which would always trigger that event even if the checkbox got replaced on a data fetch. Note that there are no other checkboxes in the thead element itself, so I don't necessarily need to select by class if it's faster to do it by type.

Riz
  • 5,680
  • 16
  • 56
  • 91

0 Answers0