Maintain Column Order On Postback

4 posts, 0 answers
  1. Ryan
    Ryan avatar
    5 posts
    Member since:
    Oct 2008

    Posted 26 Dec 2008 Link to this post

    On the grid, columns are dragged and reordered.  When a user clicks one of the column headers to sort it after they have been reordered, they go back to the order they were orginally presented when the grid loaded for the first time.  On the first post back from the sort everything is in it's proper place however each subsequent time the order is lost.

  2. Kevin Babcock
    Kevin Babcock avatar
    189 posts
    Member since:
    Mar 2007

    Posted 28 Dec 2008 Link to this post

    Hi Ryan,

    If you want to maintain the order of the columns of your RadGrid across postbacks, you should perform the reordering on the server. You can easily accomplish this by setting RadGrid's ClientSettings.ReorderColumnsOnClient property to false.


    I hope this helps. Let me know if you need some additional help.

    Kevin Babcock

  3. DevCraft R3 2016 release webinar banner
  4. Ryan
    Ryan avatar
    5 posts
    Member since:
    Oct 2008

    Posted 30 Dec 2008 Link to this post

    I don't think I described this correctly.  A user orders the columns to their liking, this new order needs to presist across multiple postbacks.  Setting  ReorderColumnsOnClient="false" makes the columns go back to the order they appeared on the first load and ReorderColumnsOnClient="true" works only for 1 postback, for example, when a user sorts the first time it appears correctly, when they sort the second time it performs as if it was ReorderColumnsOnClient="false" .  It needs to perform like ReorderColumnsOnClient="true" except that it needs to keep working across multiple postbacks, not just one.  In the demos I've seen this works correctly however it isn't working in my grid, maybe there is a conflicting property?
  5. Yavor
    Yavor avatar
    11 posts

    Posted 05 Jan 2009 Link to this post

    Hi Ryan,

    I tested the behavior that you mentioned, and the conrol behaved as expected.
    Attached to this message, is the code, which I used for testing.
    Take a look at it and let me know if I am leaving something out.

    All the best,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top