Prevent GridPanel reload on resize

  1. #1

    Prevent GridPanel reload on resize

    Hi!

    I have a GridPanel inside a Panel which is loaded into a Window. Whenever I change the size of the Window (or min/maximize it), the GridPanel reloads its rows. How could it be prevented?
    Here's the markup:

    @(X.Viewport()
              .Layout(LayoutType.Border)
              .Items(
                  X.Panel()
                      .Border(true)
                      .Region(Region.Center)
                      .Layout(LayoutType.Fit)
                      .Items(
                          Html.X().GridPanel()
                              .Layout(LayoutType.Fit)
    Thanks in advance!
  2. #2
    Hello,

    The code sample you provided does not reproduce the issue.

    For me, a GridPanel is not reloaded when a parent Window is resized.
    Geoffrey McGill
    Founder
  3. #3
    In the window loader I had this ReloadOnEvent property set to true, it caused the phenomenon.
    Thanks!
  4. #4
    Hi,

    A Loader's default event is "afterlayout". It is why it reloads on resizing. Resizing causes re-layouting.

Similar Threads

  1. Replies: 3
    Last Post: Oct 13, 2015, 7:13 AM
  2. [CLOSED] Resize Content from Loader after Resize Window Container
    By Ujvari in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 27, 2014, 7:58 PM
  3. Replies: 1
    Last Post: Aug 22, 2011, 5:54 PM
  4. [CLOSED] How to prevent focus loss after calling store.reload()
    By webclouder in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Jun 20, 2011, 9:21 PM
  5. Replies: 3
    Last Post: Feb 22, 2009, 2:58 PM

Tags for this Thread

Posting Permissions