Results 1 to 8 of 8

Thread: [FIXED-1012] CheckboxSelectionModel

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Sep 2009
    Posts
    22
    Vote Rating
    0
      0  

    Default [FIXED-1012] CheckboxSelectionModel

    Ext version tested:

    • Ext 3.2.x



    Browser versions tested against:

    • FF3.6.3 (firebug 1.5.3 installed)



    Operating System:

    • Win 7
    • WinXP Pro



    Test Case:

    See this URL : http://www.extjs.com/deploy/dev/exam...d-plugins.html


    Steps to reproduce the problem:

    • Click on a row to select it.
    • Then, click a checkbox (other than the "select all" box). No effect.
    • Then, click a checkbox a second time and it will select/deselect.
    • This seems to happen every time a row is clicked. Using only checkboxes to select seems to work.



    The result that was expected:

    • First click on a checkbox after selecting a row should have some effect.

  2. #2
    Ext JS Premium Member
    Join Date
    Sep 2009
    Posts
    22
    Vote Rating
    0
      0  

    Default

    Any update on this? This problem occurs in IE as well.

  3. #3
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    534
    Vote Rating
    0
      0  

    Default

    Just confirming this bug; it was introduced within the last two releases.

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    128
      0  

    Default

    Can I suggest:
    Code:
    Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, {
        header : '<div class="x-grid3-hd-checker"></div>',
        width : 20,
        sortable : false,
        menuDisabled : true,
        fixed : true,
        hideable: false,
        dataIndex : '',
        id : 'checker',
        /*constructor : function(){
            Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this, arguments);
            if(this.checkOnly){
                this.handleMouseDown = Ext.emptyFn;
            }
        },*/
        initEvents : function(){
            Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);
            this.grid.on('render', function(){
                var view = this.grid.getView();
                //view.mainBody.on('mousedown', this.onMouseDown, this);
                Ext.fly(view.innerHd).on('mousedown', this.onHdMouseDown, this);
            }, this);
        },
        handleMouseDown : function(grid, rowIndex, e) {
            if(e.button === 0 && e.getTarget().className == 'x-grid3-row-checker'){
                e.stopEvent();
                if(this.isSelected(rowIndex)){
                    this.deselectRow(rowIndex);
                }else{
                    this.selectRow(rowIndex, true);
                    grid.getView().focusRow(rowIndex);
                }
                return;
            }
            if (!this.checkOnly) {
                Ext.grid.CheckboxSelectionModel.superclass.handleMouseDown.apply(this, arguments);
            }
            //this.mouseHandled = true;
        },
        /*onMouseDown : function(e, t){
            if(e.button === 0 && t.className == 'x-grid3-row-checker'){
                e.stopEvent();
                var row = e.getTarget('.x-grid3-row');
                if(!this.mouseHandled && row){
                    var index = row.rowIndex;
                    if(this.isSelected(index)){
                        this.deselectRow(index);
                    }else{
                        this.selectRow(index, true);
                        this.grid.getView().focusRow(index);
                    }
                }
            }
            this.mouseHandled = false;
        },*/
        onHdMouseDown : function(e, t){
            if(t.className == 'x-grid3-hd-checker'){
                e.stopEvent();
                var hd = Ext.fly(t.parentNode);
                var isChecked = hd.hasClass('x-grid3-hd-checker-on');
                if(isChecked){
                    hd.removeClass('x-grid3-hd-checker-on');
                    this.clearSelections();
                }else{
                    hd.addClass('x-grid3-hd-checker-on');
                    this.selectAll();
                }
            }
        },
        renderer : function(v, p, record){
            return '<div class="x-grid3-row-checker"></div>';
        }
    });
    (and IMHO we should also use grid.headerclick instead of innerHd.mousedown)

  5. #5
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,984
    Vote Rating
    933
      0  

    Default

    I believe this issue has been resolved as of the 3.3 beta. Can others confirm?
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  6. #6
    Ext JS Premium Member
    Join Date
    Sep 2009
    Posts
    22
    Vote Rating
    0
      0  

    Default

    Yes, it does seem to be resolved as of 3.3 beta 2.

  7. #7
    Sencha User
    Join Date
    Nov 2007
    Posts
    294
    Vote Rating
    0
      0  

    Default

    I am using 3.3beta and CheckboxSelectionModel doesn't work with multiselect.

  8. #8
    Sencha - Support Team keckeroo's Avatar
    Join Date
    Mar 2008
    Location
    Winnipeg, Canada
    Posts
    379
    Vote Rating
    10
      0  

    Default Still an issue in 3.3.1

    Multi select is still not working in 3.3.1 .... initEvents is not called.

    Kevin

Similar Threads

  1. [FIXED-1012] Ext.Button memory leak
    By bt_bruno in forum Ext 3.x: Bugs
    Replies: 1
    Last Post: 2 Jun 2010, 8:16 AM
  2. [Resolved] Access denied 1012, even with ScriptTagProxy/JSON
    By binadit in forum Ext 2.x: Help & Discussion
    Replies: 10
    Last Post: 5 May 2009, 6:08 PM
  3. Replies: 15
    Last Post: 16 Mar 2009, 2:35 PM
  4. [FIXED][1.1] EditorGrid, scroll and CheckBoxSelectionModel
    By yopiyop in forum Ext GWT: Bugs (1.x)
    Replies: 1
    Last Post: 8 Oct 2008, 9:23 AM
  5. error 1012 on xml request...
    By luismanolo in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 5 Jul 2008, 1:44 PM

Posting Permissions

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