Page 7 of 10 FirstFirst ... 56789 ... LastLast
Results 61 to 70 of 99

Thread: LockingGridPanel - Grid with fixed and scrolling columns

  1. #61

    Default

    hi,

    this was asked before, but not answered: is there a way how i can get the locked columns on the right side of the grid?

  2. #62
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    Quote Originally Posted by UnarmedHunter View Post
    this was asked before, but not answered: is there a way how i can get the locked columns on the right side of the grid?
    It's possible, but you would have to modify this extension extensively.

  3. #63
    Ext JS Premium Member
    Join Date
    Nov 2008
    Location
    Reston, VA
    Posts
    14

    Default

    Quote Originally Posted by Pranay_Kumar View Post
    Hi Condor,

    I am trying to use Locking grid extentions with Checkbox selection model. In this scenario i am trying to move the locked column just before 'checkbox selection column', in other words the selection column should always be locked and when we lock any column the first locked column should be 'selection column' and then other locked columns. The attached image may describe it more exactly. the problem which i faced with this approach is that it is not able to select more than one object at a time. As suggested in the previous post i tried to override the isLocked behavior as :--

    Code:
        isLocked :function(colIndex){
            if(this.config[colIndex] instanceof Ext.grid.CheckboxSelectionModel){return true;}
            return this.config[colIndex].locked === true;
         },
    and aslo used :--

    Code:
    var sm = new Ext.grid.CheckboxSelectionModel({
        locked: true,
        isLocked: 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.lockedInnerHd).on('mousedown', this.onHdMouseDown, this);
            }, this);
        }
    });
    Any suggestions. Am i missing something?

    Also thanks a lot for such a good extentions. I successfully tried to use this extension with Buffered view extention with some minor changes.

    Thanks,
    Pranay

    This fix will solve the multiple selection problem:
    var sm = new Ext.grid.CheckboxSelectionModel({
    locked: true,
    isLocked: Ext.emptyFn,
    initEvents : function(){
    Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);
    this.grid.on('render', function(){
    var view = this.grid.getView();
    view.lockedBody.on('mousedown', this.onMouseDown, this);
    Ext.fly(view.lockedInnerHd).on('mousedown', this.onHdMouseDown, this);
    }, this);
    }
    });

  4. #64
    Sencha User
    Join Date
    Mar 2010
    Posts
    3

    Post Column header height not consistent in Chrome

    I wanted to report a minor rendering issue I am seeing in Chrome when the column header labels span multiple lines. In the example below, the locked column header is one header is one line, while the other columns are two. For some reason, Chrome overrides the height setting with an incorrect computed value.

    I have attached a screenshot showing the issue.

    Workaround, make all column headers the same number of lines.

    Here is some code to recreate the issue.
    PHP Code:
    <html
    ....
    <
    body>
        
    Lock column header is one lineunlocked column is two lines
        
    <div id="lockGrid"></div>
        <
    br /><br />
        
    Works fine when all column headers have the same number of lines
        
    <div id="lockGridOk"></div>
        <
    script type="text/javascript">
            
    Ext.onReady(function(){
                 
    // create the data store
                 
    var store = new Ext.data.ArrayStore({
                    
    fields: [
                        {
    name'a'}
                       ,{
    name'b'}
                    ]
                });
                
    store.loadData([
                     [
    'a','b']
                    ,[
    'aa','bb']
                    ,[
    'aaa','bbb']
                ]);
                
    //Create the first grid (headers do not line up in chrome)
                
    var aColumnsBad=[ 
                    {     
    header"line 1"
                        
    dataIndex'a'
                        
    lockedtrue
                        
    width:150    
                    
    },{
                        
    header:'line 1<br/>line 2'
                        
    ,dataIndex'b'
                        
    ,width:80 
                    
    }
                ];
                
    //Create the second grid (headers do line up in chrome)
                
    this.gridBad = new Ext.ux.grid.LockingGridPanel({
                     
    renderTo:'lockGrid'
                    
    ,store:store
                    
    ,columnsaColumnsBad
                    
    ,enableColumnMove:false
                    
    ,enableHdMenu:false
                    
    ,height120
                    
    ,width275
                
    });
                
                var 
    aColumnsGood=[ 
                    {   
    _oa:{dateId:null}
                        , 
    header"line 1<br/>line 2"
                        
    dataIndex'a'
                        
    lockedtrue
                        
    width:150    
                    
    },{
                        
    header:'line 1<br/>line 2'
                        
    ,dataIndex'b'
                        
    ,width:80 
                    
    }
                ];
                
    // create grid
                
    this.gridGood = new Ext.ux.grid.LockingGridPanel({
                     
    renderTo:'lockGridOk'
                    
    ,store:store
                    
    ,columnsaColumnsGood
                    
    ,enableColumnMove:false
                    
    ,enableHdMenu:false
                    
    ,height120
                    
    ,width275
                
    });
            });
        
    </script>
    </body>
    </html> 
    This is a very useful extentsion and I really appreciate all the effort that has been put into it. BTW, are there any plans to update it to work with the 3.3 beta?
    Attached Images Attached Images

  5. #65
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    Read this bugreport (with fix).

  6. #66
    Sencha User
    Join Date
    Jan 2009
    Location
    Manchester, UK
    Posts
    21

    Default

    Great extension! One problem I've ran into however is that it doesn't seem to respond to metaData from the store for creating dynamic columns, is this a known issue?

    cheers

  7. #67
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    GridView doesn't support reading columns from metaData. You probably included an extension to support that (which you didn't adapt for LockingGridView I assume?).

  8. #68
    Sencha User
    Join Date
    Jan 2009
    Location
    Manchester, UK
    Posts
    21

    Default

    I use a GridPanel configured with a JsonStore, no view set and columns set to []. The store is set to autoload.. I'm not using any extensions whatsoever. Then I added this ux I set the view to new Ext.ux.grid.LockingGridView() and the colModel to new Ext.ux.grid.LockingColumnModel([]).

    I take it when you use explicitly define a view this overrides/blocks or doesn't pay any attention to metaData?

    thanks!

  9. #69
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    And where do you apply the columns from the metaData to the grid? (that isn't part of Ext - you added that!).

  10. #70
    Sencha User
    Join Date
    Jan 2009
    Location
    Manchester, UK
    Posts
    21

    Default

    ah, yeah, sorry I completely forgot about that bit. Currently I've got:

    Code:
    viewConfig: {
    	onDataChange: function(){
    		this.cm.setConfig(this.ds.reader.jsonData.columns);
    		this.syncFocusEl(0);
    	}
    }
    So .. I'm guessing I need to poke the GridView as well. Will see what I can figure out. Thanks for pointing me in the right direction!

Page 7 of 10 FirstFirst ... 56789 ... LastLast

Posting Permissions

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