Results 1 to 3 of 3

Thread: Header Checkbox is not working properly with rowclick event in 6.5.0

  1. #1

    Default Header Checkbox is not working properly with rowclick event in 6.5.0

    Hi
    I am using a grid with multiple rows each row having checkbox . If you selectAll by clicking header checkbox , and deselect by clicking any row ,header checkbox is also getting deselected .
    This works as expected in version 6.0.1 Classical tool kit . Fiddle example is given bellow

    https://fiddle.sencha.com/#view/editor&fiddle/24tc

    but same code does not work in ext 6.5.1 , if you select all by header checkbox , and deselect any row header checkbox is not getting deselected for first time . Fiddle is given bellow

    https://fiddle.sencha.com/#view/editor&fiddle/24tf

    i need to use row click in checkbox model with header checkbox . please suggest me what to do

  2. #2
    Sencha Premium User
    Join Date
    Feb 2010
    Location
    Chicago
    Posts
    72
    Answers
    17

    Default

    No need for the rowclick listener since the selection model will handle selection/deselection. Remove the listener:

    Code:
    var store = Ext.create('Ext.data.Store', {
        fields : ['name', 'email', 'phone'],
        data   : [{
            name  : 'Lisa',
            email : '[email protected]',
            phone : '555-111-1224'
        }, {
            name  : 'Bart',
            email : '[email protected]',
            phone : '555-222-1234'
        }, {
            name  : 'Homer',
            email : '[email protected]',
            phone : '555-222-1244'
        }, {
            name  : 'Marge',
            email : '[email protected]',
            phone : '555-222-1254'
        }]
    });
    
    
    Ext.create('Ext.grid.Panel', {
        title    : 'Simpsons',
        store    : store,
        columns  : [{
            text      : 'Name',
            dataIndex : 'name'
        }, {
            text      : 'Email',
            dataIndex : 'email',
            flex      : 1
        }, {
            text      : 'Phone',
            dataIndex : 'phone'
        }],
        height   : 200,
        width    : 400,
        renderTo : Ext.getBody(),
        selModel : {
            selType            : 'checkboxmodel',
            showHeaderCheckbox : true,
            injectCheckbox     : 'last',
            checkOnly          : true,
        }
    });

  3. #3

    Default

    Yup that solution solved my problem but my doubt is why the same code is behaving differently in two different versions

Similar Threads

  1. Grid header checkbox is not aligned properly
    By rishu27 in forum Ext: Q&A
    Replies: 1
    Last Post: 23 Jun 2013, 9:35 PM
  2. event handler not working properly
    By mikebolton in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 22 Jun 2011, 5:27 PM
  3. Replies: 3
    Last Post: 25 Nov 2009, 5:34 PM
  4. [FIXED] CheckBox not working properly in IE6
    By RaviM in forum Ext GWT: Bugs (2.x)
    Replies: 3
    Last Post: 19 Nov 2009, 12:40 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •