I want to rearrange multiple columns in data table


I want to rearrange multiple coulmns in datatable . but using set ordinal i’m able to position only one column

  1. assign the following to dt
    new DataView(dt).ToTable(false,new List(Of String)({"Column1", "Column3", "Column2"}).ToArray)

“Column1”, “Column3”, “Column2” is the order of the columns

now dt columns will be arrranged to Column1,Column3,Column2

Hey @yash_p,

Go through this video this will help you to rearrange the datatable in one shot.

Thanks,
Sanjit