Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
UltraWebGrid loses sorting state
posted

I have an UltraWebGrid and an UpdatePanel (not surrounding the grid) on my page. The grid is set to LoadOnDemand="Xml", has some default sorting applied and is not part of the UpdatePanels partial update.

So, if i do some updates with the UpdatePanel everything works fine and the grid stays as it should without changing. But on the next full postback, when the grid is loaded again, the sorting of the grid has been lost.

Does anybody know to get around this problem?

  • 45049
    Suggested Answer
    posted

    MartinMosimann,

    The first thing I notice is that you're combining the grid's AJAX functionality (LoadOnDemand="Xml") with ASP.NET AJAX Extensions (the UpdatePanel).  These use two different AJAX frameworks that cannot be made compatible.

    To resolve this, you have two options:

    • Turn off the grid's AJAX functionality altogether (LaodOnDemand="NotSet") and continue using UpdatePanel.
    • Replace UpdatePanel with WebAsyncRefreshPanel ("WARP") and continue to use the grid's AJAX functionality.  WARP is compatible with WebGrid's AJAX functionality.

    When the grid's AJAX functionality is enabled, a full postback causes much of the grid's settings to be reset.  I don't believe that sort order is one of those things, though I haven't tested this recently.  Test to see what happens when you take the UpdatePanel (or WARP) out of the picture entirely.