1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    80
    Vote Rating
    0
    Answers
    3
    stoertebeker is on a distinguished road

      0  

    Default Unanswered: Scrolling in Gridpanel

    Unanswered: Scrolling in Gridpanel


    Hi,
    I have defined a gridpanel with two columns. The gridpanel is embedded into a container. The size of the container allows to view 6 rows. Since the actual list is longer (ca.200 rows) I thought that the gridpanel would automatically show scroll bars when i set autoScroll to true. The code below is generated by SenchaArchitect. Also I wasn't exactly clear what the difference between the 2 autoScrolls (on the gridpanel and on the viewConfig) is. I tried all combinations but no scroll bars.

    Code:
                              xtype: 'container',
                              flex: 1,
                              items: [
                                {
                                  xtype: 'gridpanel',
                                  id: 'toprankings',
                                  autoScroll: true,
                                  title: 'Top Rankings',
                                  store: 'TopCombined',
                                  columns: [
                                    {
                                      xtype: 'gridcolumn',
                                      dataIndex: 'userid',
                                      flex: 2,
                                      text: 'User'
                                    },
                                    {
                                      xtype: 'numbercolumn',
                                      align: 'right',
                                      dataIndex: 'score',
                                      flex: 1,
                                      text: 'Score',
                                      format: '0,000'
                                    }
                                  ],
                                  viewConfig: {
                                    autoScroll: true
                                  }
                                }
    Any hint appreciated.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,154
    Vote Rating
    475
    Answers
    685
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    I would remove the grid from the container. No need to place a gridPanel (panel) inside another container.
    The grid also handles the scrolling itself, no need for autoScroll.

    Regards,
    Scott.

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    80
    Vote Rating
    0
    Answers
    3
    stoertebeker is on a distinguished road

      0  

    Default


    Hi Scott,
    thanks for the hints. The good thing: it works! Is there any chance to get some hints why the container 'parent' prohibited the scrolling? I would just like to get a better understanding of the framework.I also disabled the 'autoScroll' and still get the scrolling. So what is the idea of the 'autoScroll' otion?
    Thanks
    Olaf

Thread Participants: 1

Tags for this Thread