Results 1 to 3 of 3

Thread: Scrolling in Gridpanel

  1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    80
    Answers
    3
    Vote Rating
    0
      0  

    Default 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,390
    Answers
    716
    Vote Rating
    498
      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
    Answers
    3
    Vote Rating
    0
      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

Tags for this Thread

Posting Permissions

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