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
65
How to order columns upon load?
posted

If I want to change the order or set the order of the columns on load of the page on a webgrid. How would I accomplish that?

Thanks

Jaime

  • 1763
    posted

    You can easily move the columns one by one, in whatever order you want them to. Here I'm moving the first column to the end, so it'll be the last column now.

     grid1.Columns[0].Move(grid1.Columns.Count - 1);