Approved
Last Updated: 17 Aug 2016 08:29 by ADMIN
John
Created on: 16 Aug 2016 19:22
Category: GridView
Type: Bug Report
0
FIX. RadGridView - Column order differs from datasource when previous datasource has some columns of same name
Create a DataTable with columns Column1, Column2, Column3, Column4, Column5, and bound to RadGridView. Create a second DataTable with columns Column1, Column2a, Column3, Column4, Column5, and re-bind the RadGridView to this DataTable. Instead of the columns appearing in the same order as they are in the second DataTable, they show up as Column1, Column3, Column4, Column5, Column2a in the RadGridView. 
Attached Files:
1 comment
ADMIN
Stefan
Posted on: 17 Aug 2016 08:28
Hi John,

thank you for your input regarding this case. As it would be a breaking change to start adjusting columns now, I will approve this request and if/once it gets higher demand we will consider changing the current behavior. 

For the time being, you have couple very easy options:
1. Before assigning the new data source, set the grid's DataSource property to null
2. After the new data source is attached use the grid.Columns.Move method to adjust their position

I hope this helps.