1. #31
    Ext User
    Join Date
    Oct 2009
    Posts
    3
    Vote Rating
    0
    wensa is on a distinguished road

      0  

    Default Problem with PagingToolbar

    Problem with PagingToolbar


    I have added a PagingToolbar on my TreeGrid with NestedSetStore. I fixed the Nodes via Tree.php. It works fine. But when I click on a row, the pager loss Data and I couldn't navigate through the pages. Is there a listener needed?

    Sorry, I am a poor beginner and my English isn't good.

    @MaximGB
    Thanks a lot for the great extension.

    Code:
     <?php 
      $id=1;
      echo"<script language=\"javascript\" >";
      echo"
      Controller = function()
      
    {
    
        
         
        
        var grid, record;
    
        function createGrid()
        {";
        
     
    
     
     echo"
     
       // create the data store
        var record = Ext.data.Record.create([
                {name: '$fname[0]'},
               {name: '$fname[1]'},
               {name: '$fname[2]'},
             {name: '_id', type: 'int'},
             {name: '_level', type: 'int'},
             {name: '_lft', type: 'int'},
             {name: '_rgt', type: 'int'},
             {name: '_is_leaf', type: 'bool'}
           ]);
      var store = new Ext.ux.maximgb.tg.NestedSetStore({
            autoLoad : true,";
     if($geraet==1)
     echo"url: 'pager.php?geraet=1',";
     else
      echo"      url: 'pager.php?geraeteid=".$geraeteid."',";
      echo"
                reader: new Ext.data.JsonReader(
                    {
                        id: '_id',
                        root: 'data',
                        totalProperty: 'total',
                        successProperty: 'success'
                    }, 
                    record
                )
        });
    var combo = new Ext.form.ComboBox({
      name : 'perpage',
      width: 40,
      store: new Ext.data.ArrayStore({
        fields: ['id'],
        data  : [
          ['15'],
          ['25'],
          ['50']
        ]
      }),
      mode : 'local',
      value: '15',
    
      listWidth     : 40,
      triggerAction : 'all',
      displayField  : 'id',
      valueField    : 'id',
      editable      : false,
      forceSelection: true
    });
        
        var bbar = new Ext.ux.maximgb.tg.PagingToolbar({
     store:       store, //the store you use in your grid
      displayInfo: true,
     
      
     items   :    [
       '-',
     'Anzahl pro Seite: ',
    combo
                                  
    ]
    });
     
    
    combo.on('select', function(combo, record) {
      bbar.pageSize = parseInt(record.get('id'), 10);
      bbar.doLoad(bbar.cursor);
    }, this);
         // create the Grid
        var grid = new Ext.ux.maximgb.tg.GridPanel({
          store: store,
          
          
          bbar: bbar,
          master_column_id : '$fname[0]',
          columns: [
          
          {
                id:'$fname[0]',
                header: '$fname[0]', 
                width: 160, 
                sortable: true, 
                dataIndex: '$fname[0]'
              
            }, {
                header: '$fname[1]', 
                width: 300, 
                sortable: true, 
                
                dataIndex: '$fname[1]'
                
            }, {
                header: '$fname[2]', 
                width: 75, 
                sortable: true, 
               
                dataIndex: '$fname[2]'
                        
            }
          ],
          stripeRows: true,
        autoExpandColumn: '$fname[0]',
        ";
     if($geraet==1)
     echo"title: 'Geräte / Dokumente',";
     else 
     echo  "title: 'Methodenliste / Dokumente - ".$geraeteid."',";
         echo "
        
          
          viewConfig : {
              enableRowBody : true
          }
        });
        var vp = new Ext.Viewport({
            layout : 'fit',
            items : grid
        });
       
        }
        
        
    
    
      
    
        return {
            init : function()
            {
                createGrid();
            }
        }
    }();
        
    
    Ext.onReady(Controller.init);
     </script>";
      
     echo"<script type='text/javascript'>//<![CDATA[
        Ext.BLANK_IMAGE_URL = 'ext-3.0.0/resources/images/default/s.gif';
     //]]></script>";
    
    
    echo"<br clear=all>";
    
    echo"</body>";
    
    
    ?>

  2. #32
    Ext User
    Join Date
    Oct 2009
    Posts
    3
    Vote Rating
    0
    wensa is on a distinguished road

      0  

    Default Problem fixed with override select row

    Problem fixed with override select row


    I fixed my Problem with an Override Logic. I read on the Page from MaximGB, that it is normal, that the Pager goes on the expanded / selected row /node

    Code:
    Ext.override(Ext.grid.RowSelectionModel, {
            handleMouseDown : function(g, rowIndex, e){
            if(e.button !== 0 || this.isLocked()){
                return;
            };
            var view = this.grid.getView();
            if(e.shiftKey && this.last !== false){
                var last = this.last;
                this.selectRange(last, rowIndex, e.ctrlKey);
                this.last = last;             view.focusRow(rowIndex);
            }else{
                var isSelected = this.isSelected(rowIndex);
            if(isSelected){
                    this.deselectRow(rowIndex);
                }else if(!isSelected || this.getCount() > 1){
                    this.deselectRow(rowIndex, e.ctrlKey || e.shiftKey);
                    view.focusRow(rowIndex);
                }
            }
        }
    });
    Quote Originally Posted by wensa View Post
    I have added a PagingToolbar on my TreeGrid with NestedSetStore. I fixed the Nodes via Tree.php. It works fine. But when I click on a row, the pager loss Data and I couldn't navigate through the pages. Is there a listener needed?

    Sorry, I am a poor beginner and my English isn't good.

    @MaximGB
    Thanks a lot for the great extension.

    Code:
     <?php 
      $id=1;
      echo"<script language=\"javascript\" >";
      echo"
      Controller = function()
      
    {
    
        
         
        
        var grid, record;
    
        function createGrid()
        {";
        
     
    
     
     echo"
     
       // create the data store
        var record = Ext.data.Record.create([
                {name: '$fname[0]'},
               {name: '$fname[1]'},
               {name: '$fname[2]'},
             {name: '_id', type: 'int'},
             {name: '_level', type: 'int'},
             {name: '_lft', type: 'int'},
             {name: '_rgt', type: 'int'},
             {name: '_is_leaf', type: 'bool'}
           ]);
      var store = new Ext.ux.maximgb.tg.NestedSetStore({
            autoLoad : true,";
     if($geraet==1)
     echo"url: 'pager.php?geraet=1',";
     else
      echo"      url: 'pager.php?geraeteid=".$geraeteid."',";
      echo"
                reader: new Ext.data.JsonReader(
                    {
                        id: '_id',
                        root: 'data',
                        totalProperty: 'total',
                        successProperty: 'success'
                    }, 
                    record
                )
        });
    var combo = new Ext.form.ComboBox({
      name : 'perpage',
      width: 40,
      store: new Ext.data.ArrayStore({
        fields: ['id'],
        data  : [
          ['15'],
          ['25'],
          ['50']
        ]
      }),
      mode : 'local',
      value: '15',
    
      listWidth     : 40,
      triggerAction : 'all',
      displayField  : 'id',
      valueField    : 'id',
      editable      : false,
      forceSelection: true
    });
        
        var bbar = new Ext.ux.maximgb.tg.PagingToolbar({
     store:       store, //the store you use in your grid
      displayInfo: true,
     
      
     items   :    [
       '-',
     'Anzahl pro Seite: ',
    combo
                                  
    ]
    });
     
    
    combo.on('select', function(combo, record) {
      bbar.pageSize = parseInt(record.get('id'), 10);
      bbar.doLoad(bbar.cursor);
    }, this);
         // create the Grid
        var grid = new Ext.ux.maximgb.tg.GridPanel({
          store: store,
          
          
          bbar: bbar,
          master_column_id : '$fname[0]',
          columns: [
          
          {
                id:'$fname[0]',
                header: '$fname[0]', 
                width: 160, 
                sortable: true, 
                dataIndex: '$fname[0]'
              
            }, {
                header: '$fname[1]', 
                width: 300, 
                sortable: true, 
                
                dataIndex: '$fname[1]'
                
            }, {
                header: '$fname[2]', 
                width: 75, 
                sortable: true, 
               
                dataIndex: '$fname[2]'
                        
            }
          ],
          stripeRows: true,
        autoExpandColumn: '$fname[0]',
        ";
     if($geraet==1)
     echo"title: 'Geräte / Dokumente',";
     else 
     echo  "title: 'Methodenliste / Dokumente - ".$geraeteid."',";
         echo "
        
          
          viewConfig : {
              enableRowBody : true
          }
        });
        var vp = new Ext.Viewport({
            layout : 'fit',
            items : grid
        });
       
        }
        
        
    
    
      
    
        return {
            init : function()
            {
                createGrid();
            }
        }
    }();
        
    
    Ext.onReady(Controller.init);
     </script>";
      
     echo"<script type='text/javascript'>//<![CDATA[
        Ext.BLANK_IMAGE_URL = 'ext-3.0.0/resources/images/default/s.gif';
     //]]></script>";
    
    
    echo"<br clear=all>";
    
    echo"</body>";
    
    
    ?>

  3. #33
    Ext User
    Join Date
    Nov 2009
    Posts
    15
    Vote Rating
    0
    fu90 is on a distinguished road

      0  

    Question


    Hello Everyone,

    There is a flaw of displaying tree grid in IE6 when the content of master column too long,but It's OK in IE7 and IE8

    please see attachment for more detail.

    Does anyone have any solution to handle this problem?

    Thanks and regards.
    Attached Images

  4. #34
    Sencha Premium Member MaximGB's Avatar
    Join Date
    Jun 2007
    Location
    Moscow, Russia
    Posts
    508
    Vote Rating
    5
    MaximGB is on a distinguished road

      0  

    Default


    Use strict doctype
    Use the force - read the source.

  5. #35
    Ext User
    Join Date
    Nov 2009
    Posts
    15
    Vote Rating
    0
    fu90 is on a distinguished road

      0  

    Talking


    Thanks

  6. #36
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    315
    Vote Rating
    0
    josh803316 is on a distinguished road

      0  

    Default


    I'm having some performance issues with the tree grid. When I expand my nodes, if I have more than 50 or so records in my expanded set it takes quite a while to load and sometimes even freezes with the javascript debugger error. Do you have any performance tips for loading large sets?

  7. #37
    Sencha User demongloom's Avatar
    Join Date
    Apr 2008
    Location
    Israel
    Posts
    30
    Vote Rating
    3
    demongloom is on a distinguished road

      0  

    Default


    Josh, try to find answers in my changeset for tree grid.

    http://www.extjs.com/forum/showthrea...487#post380487

    It is modifications for 2.0 version, but I hope is possible to port them for 3.0 version too.


  8. #38
    Ext User
    Join Date
    Jul 2009
    Posts
    1
    Vote Rating
    0
    ps_senthil is on a distinguished road

      0  

    Default Paging

    Paging


    MaximGB,

    Thanks for the great extension. You rock.

    I am using EditorGridPanel with Server side paging and it works great.

    My only problem is the paging control getting reset when a node is expanded or selected. I read in your documentation that "To start paging at the root nodes level one must deselect all nodes.". However I am not able to reset it to the root level. Please advise on how to deselect all nodes.

    Even in your example at http://max-bazhenov.com/dev/ux.maxim..._ns/index.html, I am not able to reset to the root level paging.

    Please help. Thanks again for the great plugin.

  9. #39
    Ext User
    Join Date
    Sep 2009
    Posts
    51
    Vote Rating
    0
    harsha_velicheti is on a distinguished road

      0  

    Default Root_Title problem in tree gird

    Root_Title problem in tree gird


    Hi maxim,
    First thanks a ton for this great extension, i am trying to use the tree grid and facing a couple for problems as below:
    1. The rool_title config values appears above the grid header (if i dont give any thing title is taken as default as i see in code), can you please explain how this is used in tree grid.(Please see the attached image to get better view.)Issue.JPG
    2. Even if I give autoExpanColumn the column doesn't get expanded on the first show.

    Thanks in advance
    Harsha

  10. #40
    Sencha Premium Member MaximGB's Avatar
    Join Date
    Jun 2007
    Location
    Moscow, Russia
    Posts
    508
    Vote Rating
    5
    MaximGB is on a distinguished road

      0  

    Default


    Quote Originally Posted by harsha_velicheti View Post
    Hi maxim,
    First thanks a ton for this great extension, i am trying to use the tree grid and facing a couple for problems as below:
    1. The rool_title config values appears above the grid header (if i dont give any thing title is taken as default as i see in code), can you please explain how this is used in tree grid.(Please see the attached image to get better view.)Attachment 17787
    This is used to control selection, by clicking on the root title you'll deselect all and thus pager will switch to root nodes level, otherwise pager shows data for the last selected node.
    Quote Originally Posted by harsha_velicheti View Post
    2. Even if I give autoExpanColumn the column doesn't get expanded on the first show.
    Use the force - read the source.