Results 1 to 2 of 2

Thread: put a grid inside a gridpanel to fit the contentpanel

  1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    11

    Question put a grid inside a gridpanel to fit the contentpanel

    I've read somewhere on this forum that I need to put my grid inside a gridpanel if I want the grid to fit my contentpanel everytime I resize it.
    I'm using the code from the docs to create my grid and all works perfectly:

    http://extjs.com/deploy/ext-1.0.1/ex...id/paging.html

    but I can't manage to put it in a gridpanel.
    Can you help me?
    Thanks.

  2. #2
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750

    Default

    The following works fine for me:

    Code:
    // ...
    var gridRanges = new Ext.grid.Grid('ranges-grid', {
      ds: dsRanges,
      cm: cmRanges,
      selModel: new Ext.grid.RowSelectionModel({singleSelect:true})
    });
      
    var gridPanel = new Ext.GridPanel(gridRanges, {title: 'Ranges', fitToFrame: true});
    
    // ...
    
    var inputLayout = new Ext.BorderLayout('input-content', {
      // Ranges Grid  
      center: {split:true, titlebar: false, collapsible: false, fitToFrame: true, resizeEl: 'ranges-grid', fitContainer: true},
      // Input Criteria
      east: {split:true, initialSize: 350, minSize: 300, maxSize: 400, titlebar: false, fitToFrame: true, resizeEl: 'input-criteria', fitContainer: true}          
    });
    
    inputLayout.add('center', gridPanel);
    // ...
    How are you adding your gridPanel?

Posting Permissions

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