[CLOSED] CheckboxSelectionmodel Header Checkbox State

  1. #1

    [CLOSED] CheckboxSelectionmodel Header Checkbox State

    hi,

    I am trying to get the checkbox selection model header checkbox state. how can i get access to this checkbox.
    Last edited by Daniil; Apr 09, 2013 at 4:02 AM. Reason: [CLOSED]
  2. #2
    Hi @RCM,

    I would get the state this way.

    var grid = App.GridPanel1,
        checkerOnCls = grid.getSelectionModel().checkerOnCls,
        header = grid.getView().headerCt.child('gridcolumn[isCheckerHd]'),
        state = header.hasCls(checkerOnCls);
        
    alert(state ? "checked" : "unchecked");
  3. #3
    hi,

    I am trying to use the code above with the latest SVN release but the line below returns null..

     header = grid.getView().headerCt.child('gridcolumn[isCheckerHd]'),
  4. #4
    hi,

    Please ignore, I realized that the check box header is not available once you are using buffered scrolling.
  5. #5
    Yes, the showHeaderCheckbox setting is false by default if a buffered Store.
    http://docs.sencha.com/ext-js/4-2/#!...HeaderCheckbox
  6. #6
    hi,

    Is there any way to override this behavior?
  7. #7
    You could override the addCheckbox method.
    http://docs.sencha.com/ext-js/4-2/#!...od-addCheckbox

    But clicking a header checkbox won't select all records. It could select only the current page's records.

Similar Threads

  1. Replies: 2
    Last Post: Oct 29, 2012, 1:47 PM
  2. Replies: 3
    Last Post: Aug 30, 2010, 8:20 AM
  3. [CLOSED] CheckboxSelectionModel Checkbox hide
    By majestic in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 29, 2010, 2:14 PM
  4. [CLOSED] Nullable (three state) checkbox
    By pil0t in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 25, 2010, 10:41 AM
  5. [1.0] Checkboxselectionmodel hide/disable checkbox
    By SouthDeveloper in forum 1.x Help
    Replies: 1
    Last Post: Mar 22, 2010, 2:19 PM

Posting Permissions