The official release of Ext.NET Mobile is now available. Ext.NET Mobile is an ASP.NET component framework for building Phone and Tablet specific mobile web applications. Read More

Prevent GridPanel with Checkbox Selection Model from firing individual row's checkbox events when header checkbox is checked

  1. #1

    Prevent GridPanel with Checkbox Selection Model from firing individual row's checkbox events when header checkbox is checked

    We have a grid panel with checkbox selection model that display some data with the amount in the last column.
    Whenever a checkbox is checked or unchecked, the amounts are summed up and shown in a label. The select and deselect listeners are used for this operation.

    However, when the header checkbox in the grid panel is checked or unchecked, the individual rows checkbox listeners are fired which is causing the page unresponsive for some time.

    Is there any way to avoid the individual row listeners from firing when the header checkbox is checked and also when the page is changed using the paging toolbar.
  2. #2
    Hello @iansrilley!

    Sorry for the delayed reply! Without a test case I guess you don't expect from us any code, so here's what I suggest:

    You can bind an event to the header checkbox so that, while it is propagating its 'check' thru the checkboxes in the rows, then they can know it is coming from the header, so then you just skip the function code the event handler you gave to the individual rows don't run.

    So every time you click the header, it will set its state, then switch the rows as it usually does, and in the end of its own event, it undoes the state, so that next clicks to the individual checkboxes get their events handled as usual.

    I hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 4
    Last Post: Apr 30, 2015, 5:47 PM
  2. Replies: 1
    Last Post: Apr 30, 2014, 9:03 PM
  3. Replies: 10
    Last Post: Apr 19, 2013, 4:16 PM
  4. Replies: 11
    Last Post: Mar 14, 2012, 11:12 AM
  5. Replies: 4
    Last Post: Oct 06, 2010, 10:08 AM

Posting Permissions