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
1775
The problem with permutation of the columns
posted

Good afternoon.

How to update the grid, after permutation of the columns?
ColumnBase cb = grid.Columns [0];
grid.Columns [0] = grid.Columns [1];
grid.Columns [1] = cb;

Thank you for your reply.

Parents
  • 6475
    posted

    Hi Sergey,

    If you want to exchange the places of the first two columns, the more appropriate way would be:

    ColumnBase cb = grid.Columns [1];
    grid.Columns.Remove(cb);
    grid.Columns.Insert(0, cb);

     

     Hope this helps,

Reply Children
No Data