My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
extjs  
Updated Aug 14, 2012 by jiangjia...@gmail.com

extjs 3

1. tablepanel中直接嵌入grid时,设置grid的 autoHeight:false,height:"auto"自动出现高度滚动条

2. treepanel设置 autoScroll=true,containerScroll=true 出现滚动条

3. hbox层,设置 layout:{type:"hbox",align:"stretch"},每个子项设置flex:1自动伸展

4. 记录移动+滚动

    var grid=Ext.getCmp('grid');

    Ext.getCmp('first_action').on('click',function(){
    
        grid.selModel.selectFirstRow();
        grid.view.scrollToTop();
    });
    Ext.getCmp('last_action').on('click',function(){
        
    
        grid.selModel.selectLastRow();
        var i=grid.getStore().indexOf(grid.selModel.getSelected());
        grid.view.focusRow(i);
      
      
    });
    Ext.getCmp('previous_action').on('click',function(){
    
        grid.selModel.selectPrevious();
        var i=grid.getStore().indexOf(grid.selModel.getSelected());
        grid.view.focusRow(i);
    });
    Ext.getCmp('next_action').on('click',function(){
    
        grid.selModel.selectNext();
        var i=grid.getStore().indexOf(grid.selModel.getSelected());
        grid.view.focusRow(i);
    });
Powered by Google Project Hosting