Results 1 to 7 of 7

Thread: Strange behavior with a Grid

  1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    22

    Default Strange behavior with a Grid

    Hello Forum,

    ich have a strange problem with a grid, used to show some data from json source. OnLoad of the Grid, it does not enable scrolling and the rowsummary plugins does not get loaded.

    If i change the sorting of a column (eg from asc to desc) it refreshes the grid on some way and both scrolling and rowsummary are shown and work.

    See screenshots for detailed view.


    [/code](I changed the CSS, but thats not the problem, it does what i want)
    Code:
    .x-grid3-scroller {
        overflow-y:scroll;
        overflow-x:hidden;
    }
    Can anybody lead me to a hint, what could be wrong with this?? Thanks in advance for your time!




  2. #2
    Ext User
    Join Date
    Apr 2008
    Posts
    22

    Default

    nobody?

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Can't see anything wrong with your code.

    How does it do without your custom css rule?

  4. #4
    Ext User
    Join Date
    Apr 2008
    Posts
    22

    Default

    its the same, exept that the scrollbar isnt shown at all. only after changing the sorting.

    more info:
    - the grid(s) is/are inside a tab
    - i have another grid (but editorgrid with groupingview and rowsummary) - scrolling works fine here: shows the disabled scrollbar if no overflow, and shows the working scrollbar with overflow directly after rendering.

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    How are you putting the grid inside the tab?

  6. #6
    Ext User
    Join Date
    Apr 2008
    Posts
    22

    Thumbs up

    the tabs content comes from a html div like
    Code:
    <div id="historie">
    
     <div id="historyGrid"></div>
    
    </div>
    Code:
        var tabs = new Ext.TabPanel({
            renderTo: 'tabs',
            width:959,
            activeTab: 0,
            frame:true,
            defaults:{
                autoHeight: true,
                bodyStyle:'padding:8px;text-align:left;'
            },
            items:[
                {contentEl:'positionen', title: 'Positionen'},
                {contentEl:'zielplanung', title: 'Zielplanung'},
                {contentEl:'historie', title: 'Historie'},            
    //            {contentEl:'kursabfrage', title: 'Kursabfrage'},            
                {contentEl:'konfiguration', title: 'Konfiguration'}            
    //            {contentEl:'hilfe', title: 'Hilfe'}
            ]
        });
    then I use grid.render('historyGrid');

  7. #7
    Sencha User
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Your tabpages are not managed by Ext if you use contentEl!

    There are 2 solutions:
    1. Add autoScroll:true to the defaults section of the tabpanel. This will make all pages scrollable, but you'll probably want to remove the scrollbar from your grid by adding autoHeight:true to the grid config.

    2. Don't use contentEl, but add the grid to the tabpanel directly as one of the items. Now the height and width of the grid are automatically handled by the tabpanel.

Posting Permissions

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