CheckColumn javascript bug

  1. #1

    CheckColumn javascript bug

     Hey, there's an error in the 0.70 version of CheckColumn in the constructor: it adds a listerner grid.getView().mainBody directly, which doesn't exist until the GridView is rendered. Corrected code below:




    Ext.grid.CheckColumn.prototype = {
        init: function(grid) {
            this.grid = grid;
          
            // FIX---> mainBody isn't set until render, so we can't call right now.
            grid.on("render", function () {
                this.grid.getView().mainBody.on("mousedown", this.onMouseDown, this);
            }, this);
            // END FIX
            
               // var view = this.grid.getView();
    
               // view.mainBody.on("mousedown", this.onMouseDown, this);
        },
    
        
        ...
        

  2. #2

    RE: CheckColumn javascript bug

    Hi,

    The init function of CheckColumn called after view view render (we added check column plugin after view render). May be you have a case when it failed.


    I added check if view is not rendered then render listener is using.






Similar Threads

  1. Editable Checkcolumn gives javascript error
    By Birgit in forum 2.x Help
    Replies: 2
    Last Post: Apr 19, 2012, 11:56 AM
  2. checkcolumn
    By pankaj in forum 1.x Help
    Replies: 0
    Last Post: Mar 31, 2010, 3:00 AM
  3. CheckColumn Checked
    By Maia in forum 1.x Help
    Replies: 7
    Last Post: Jan 14, 2010, 9:30 AM
  4. get value from checkcolumn
    By maxdiable in forum 1.x Help
    Replies: 2
    Last Post: Jul 10, 2009, 6:28 PM
  5. checkcolumn select row
    By maxdiable in forum 1.x Help
    Replies: 0
    Last Post: Jul 10, 2009, 3:35 AM

Posting Permissions