1. #1
    Sencha User
    Join Date
    Jul 2009
    Posts
    11
    Vote Rating
    0
    mikelindsey is on a distinguished road

      0  

    Default DataView example

    DataView example


    Hello,

    I have two tab pages open. One tabpage has a dataview in the center region of a panel with border layout.
    I've set the panel that contains the dataview set to autoscroll and layout fit

    It all works perfect when the store loads - the dataview scrolls vertically if there is overflow.

    The problem is that if I close the second tab (that doesn't have a dataview) the tab that is still open and that has the dataview gets refreshed and the scrollbar disappears. The height on the containing panel as well
    as the dataview expands (to a size that accommodates all images) and I can't see the image records that are at the bottom.

    This is not specific to the dataview. It's an issue with the center region expanding when another tabpage is closed.

    I proved this by swaping the two regions - it's the center panel that always expands when the second tab page is closed.

    Any advice is appreciated.

    Mike

  2. #2
    Sencha User darthwes's Avatar
    Join Date
    Mar 2010
    Posts
    633
    Vote Rating
    -13
    darthwes can only hope to improve

      0  

    Default


    start by getting rid of fit layout ...
    Wes

  3. #3
    Sencha User
    Join Date
    Jul 2009
    Posts
    11
    Vote Rating
    0
    mikelindsey is on a distinguished road

      0  

    Default


    I tried that - didn't work.

    I little higher view is this:
    TabPanel
    TabPage
    TabPanel
    tabpage with border layout
    west panel
    center panel with border layout
    north panel
    center panel with layout 'auto' that contains a dataview

    When I close an unrelated second tabpage (not the one outlined above) I noticed that the size of the top center panel expands vertically to be larger than the tabpage vertical height and and along with it the inner center panel gets expanded vertically outside of the viewable area.

    So closing a tab page seems to be perfoming a layout on the new active tab page and scrapping any height config on the active tab when it does so.

  4. #4
    Sencha User
    Join Date
    Jul 2009
    Posts
    11
    Vote Rating
    0
    mikelindsey is on a distinguished road

      0  

    Default


    Figured it out -

    I need to specify a height here:

    TabPanel
    TabPage
    TabPanel <---HERE
    tabpage with border layout
    west panel
    center panel with border layout
    north panel
    center panel with layout 'auto' that contains a dataview

    Thanks

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,496
    Vote Rating
    44
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    You don't need to specify height if you are using layouts correctly.

    What's this TabPage thing?

  6. #6
    Sencha User
    Join Date
    Jul 2009
    Posts
    11
    Vote Rating
    0
    mikelindsey is on a distinguished road

      0  

    Default


    Hey Animal,

    Yeah - no surprise there.
    I plan to revisit layouts when I have some time.


    "Tabpage" is really just an item on my TabPanel.

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,496
    Vote Rating
    44
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    So you need a TabPanel as an item of a TabPanel?

  8. #8
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,657
    Vote Rating
    6
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    as Animal says: if you have to set dimensions by yourself you know that you did something wrong. Either you have overnesting or parent has wrong layout (or no layout).
    The best try first is to get rid of unneeded wrapper panels.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  9. #9
    Sencha User
    Join Date
    Jul 2009
    Posts
    11
    Vote Rating
    0
    mikelindsey is on a distinguished road

      0  

    Default


    Quote Originally Posted by Animal View Post
    So you need a TabPanel as an item of a TabPanel?
    Yep

  10. #10
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,496
    Vote Rating
    44
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    So it looks like an overnest.

    Do NOT think of putting a Component IN a tab.

    USE a Component AS A tab.

    Just add the TabPanel.

Similar Threads

  1. Drag from DataView, drop to DataView
    By AndreasI in forum Ext 3.x: Help & Discussion
    Replies: 9
    Last Post: 10 Jan 2013, 7:48 AM
  2. DataView Drag Issue: After creating first Portlet into Portal from DataView
    By amitkrgarg in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 7 Apr 2010, 1:24 PM
  3. DnD DataView to DataView with reorder - ScrollManager problem
    By gumby in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 31 Mar 2010, 1:14 PM
  4. [2.0.2] Ext.ux.Andrie.DataView (key navigated DataView)
    By andrei.neculau in forum Ext 2.x: User Extensions and Plugins
    Replies: 4
    Last Post: 10 Nov 2008, 11:51 PM
  5. Replies: 1
    Last Post: 31 May 2008, 8:59 AM

Thread Participants: 3