Results 1 to 3 of 3

Thread: Content of LiveGrid disapears

  1. #1
    Sencha User
    Join Date
    Jan 2014
    Posts
    7
    Answers
    1

    Default Content of LiveGrid disapears

    Hi everyone

    I have a LiveGrid which is placed inside a TabPanel, the data inside the LiveGrid comes from a database and it might take 2-3 seconds to fetch a new set of data. The problem is when I request a new set of data (by hitting a button) if I change the tab before receiving the data and wait 3-4 seconds (just enough to make sure that the data is received), when I come back to the LiveGrid's tab there is nothing in the LiveGrid and the it displays the EmptyText.

    Facts:
    1. I know that the data is received properly because I can access it in loader.addLoadHandler().onLoad() method.
    2. I followed all the suggestion mentioned in this post and changed the HideMode of the LiveGrid's parent container to OFFSET, DISPLAY and VISIBILITY but non of them fixed the issue
    3. I also added a TabSelectHandler to the tabPanel and called forceLayout() of the LiveGrid's parent container.
    4. The issue also happens if I change the view (using activities and places) as well.
    5. Sometimes instead of the EmptyText the content of the Grid (not the header only the part which shows the rows) will be grayed out. Below you can see that the count of the rows are correct but the content is grayed out.

    Thank you very much for your effort like always

    - Samin

    GrayGrid.jpg


  2. #2
    Sencha User
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    223
    Answers
    5

    Default

    First of all, which version of GXT are you using?
    Quote Originally Posted by saminjv View Post
    2. I followed all the suggestion mentioned in this post and changed the HideMode of the LiveGrid's parent container to OFFSET, DISPLAY and VISIBILITY but non of them fixed the issue
    You got to alter hidemode of the container, on which hide() is called, i.e. the children of TabPanel. Depending on your setup that might be "LiveGrid's parent container". Just bringing this up to make sure.


    Quote Originally Posted by saminjv View Post
    3. I also added a TabSelectHandler to the tabPanel and called forceLayout() of the LiveGrid's parent container.
    Depending von GXT version I had all kinds of trouble with calling forceLayout() beeing a noop. Especially TabPanel caused headaches in GXT 3.0.x: http://www.sencha.com/forum/showthread.php?263493

    While debugging you should step into your forceLayout() call and make sure it really leads to a doLayout() on the container and its child, i,e, the grid.

  3. #3
    Sencha User
    Join Date
    Jan 2014
    Posts
    7
    Answers
    1

    Default

    Hi Andreas,
    Thank you very much for your reply

    Quote Originally Posted by Andreas Samjeske View Post
    First of all, which version of GXT are you using?
    I use GXT 3.1.1 in which this bug should've been fixed.


    Quote Originally Posted by Andreas Samjeske View Post
    You got to alter hidemode of the container, on which hide() is called, i.e. the children of TabPanel. Depending on your setup that might be "LiveGrid's parent container". Just bringing this up to make sure.
    While debugging you should step into your forceLayout() call and make sure it really leads to a doLayout() on the container and its child, i,e, the grid.
    To make sure I'm not missing the correct container I set the HideMode of all the container to OFFSET and called forecLayout() for all of them. I also added a tabSelectionHandler to the TabPanel and called forceLayout() method there as well. The result is somehow weird as it now works for one tabPanel but not when I navigate out of the page (via activities and places). I added the same method calls for changing places that I used in TabSelectionHandler but it seems that changing places does something in the background which I can't even trace. Any more suggestions?

    Thanks again
    Cheers

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
  •