1. #1
    Sencha User
    Join Date
    Jan 2008
    Posts
    45
    Vote Rating
    0
    netslayer is on a distinguished road

      0  

    Default Hidden Grid with fit layout not rendering rows properly until doLayout

    Hidden Grid with fit layout not rendering rows properly until doLayout


    I have several grids added to several panels using layout fit - some panels are collapsed, some are hidden. Then I do a load data to a simple array store to the grids after they are rendered. When a user performs an action that shows the grids by doing a panel.show() on the parent panel around the grid I see the grids bounce and only 4 rows show. The remaining rows are out of view. If I manually call panel.doLayout() or a user clicks a titlebar to a collapsible panel to expand it then the grid resizes correctly and shows all rows. If I do grid.getView().refresh() to re-render the grid then it breaks again.

    I was able to partially reproduce this on jsfiddle:
    click add button to load the store, then click the titlebar to expand the grid. no rows show. then click fix layout and all rows show. however if you repeat the process and click the show button instead of using the collapse/expand/titlebar then it works.

    http://jsfiddle.net/NBtY2/

    any ideas on how to fix this?

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,103
    Vote Rating
    500
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    The weird thing is I can reproduce it on your fiddle, but if I create a standalone page with that example it runs as I would expect using 4.1.0, see the attached screen capture.

    http://screencast.com/t/NBE9A7Wzl4
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User
    Join Date
    Jan 2008
    Posts
    45
    Vote Rating
    0
    netslayer is on a distinguished road

      0  

    Default


    That is odd. Here is the vid of my problem on 4.1 where on render of the rows the grid is off. When another panel is expanded the rest of the grids on the page become fixed (same when I manually call a doLayout). Then they become broken again when I call getView().refresh() on row delete actions.

    http://screencast.com/t/fgqgpMctdn

  4. #4
    Sencha User
    Join Date
    Jan 2008
    Posts
    45
    Vote Rating
    0
    netslayer is on a distinguished road

      0  

    Default


    I've done some digging and basically I'm seeing the layout manager calculate() call Ext.layout.component.Component.measureContentHeight(ownerContext) twice on my gridview. All this code really does is return the size of the element (ownerContext.el.getHeight()). The first time it runs I'm seeing the correct height from the dom element, and the second time it is 46 pixels less always. Since last call wins its using the wrong height and cuts into the records as shown in the video.

    It appears this is being caused by the fact that I'm using icons (from a renderer call) on each row that weren't loaded and accounted for on one of these calls (I assume) -- the icons are higher than the standard row size so they make the rows higher causing them to overflow. If I remove the renderer function/icons then it works perfectly.

    So the question is how do I fix this? :-) can I set the height of a row via a configuration

  5. #5
    Sencha User
    Join Date
    Jan 2008
    Posts
    45
    Vote Rating
    0
    netslayer is on a distinguished road

      0  

    Default


    and to answer my own question:

    .x-grid-row td {
    height: 26px;
    }

    btw the auto save on this forum is a killer feature

  6. #6
    Sencha User
    Join Date
    Apr 2010
    Location
    Bologna, Italy
    Posts
    35
    Vote Rating
    1
    dcima is on a distinguished road

      0  

    Default


    Same situation: last row of grid not displayed properly if icons used. Thanks for your patch. It works perfectly for me.

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar