I have a datatable with nth column. Now, I want to change the index of some columns. Need help
GeekPlease
16
Junior Poster
Recommended Answers
Jump to PostTry this:
yDTable.Columns("IndexChangeColName").SetOrdinal(IndexYouWantingToChangeTo)
I'm not sure about this, but this will change the position of your column and is there're multiple columns to change - like n columns, etc... - you must use this line n times to change all the columns' position.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.