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
15
Rearranging columns in ultragrid, doesn't reflect in the datasource (Winforms, Infragistics)
posted

Lets say, I have NameColumn, IDColumn, DOBColumn in an ultragrid. Manually, I drag and drop the columns to different positions in ultragrid.

DataTable dt = ultragrid.DataSource as DataTable;

When I checked the datasource, column names is in the same order as before, data source is not reflecting the current UI column order.

Any help would be great.

Parents
No Data
Reply
  • 25665
    Offline posted

    Hello Jesuraj,

    Thank you for contacting Infragistics!

    This is the expected behavior. Rearranging the columns in the grid only changes the UI it isn’t expected to change the order in the datasource. If that is something you wanted you would have to do it manually yourself. You can handle theAfterColPosChanged event to tell when a column has moved.

    However I would not recommending changing the order of the column in your datasource, as it may cause unwanted side effects.

Children
No Data