musclejack
asked on
what is the best way to move columns in the datatable so that it is in alphabetically order
what is the best way to move columns in the datatable so that it is in alphabetically order. Example please
is it sql server?
ASKER
c#, datatable
DataView t = new DataView(yourtable);
t.Sort = "ColumnName"
gregoryyoung - https://www.experts-exchange.com/questions/20996922/help-Sorting-a-datatable-by-column.html?query=Sort+datatable+by+column&topics=327
t.Sort = "ColumnName"
gregoryyoung - https://www.experts-exchange.com/questions/20996922/help-Sorting-a-datatable-by-column.html?query=Sort+datatable+by+column&topics=327
ASKER
i mean moving around the columns from the datatable. base on the column names
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
nevermind
found it -
Change Position of Column in DataTable
The new SetOrdinal method allows users to change the position of the column in a DataTable
found it -
Change Position of Column in DataTable
The new SetOrdinal method allows users to change the position of the column in a DataTable