Author Topic: add/remove class to all rows when checkbox in header is clicked  (Read 2586 times)

Sunny

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 59
    • View Profile
Hi,

I am able to add/remove class using check/unCheck event when checkbox is clicked on each row. But how to add/remove class to all rows in the grid when checkbox on the header is clicked ?

Note:My grid contains no pagination, all data displayed in one page with scrolling.

Thanks.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: add/remove class to all rows when checkbox in header is clicked
« Reply #1 on: June 16, 2015, 04:17:57 pm »
When checkbox in header cell is checked/unchecked, ui.source == 'header' in the events.

if ( ui.source == 'header' ){
   //iterate over dataModel.data
   //addClass / removeClass to every row depending upon 'check' or 'uncheck' event.
}