Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving columns in a dataset
Message
 
 
To
26/04/2006 23:58:36
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
01116959
Message ID:
01117263
Views:
13
>I have a dataset that is used to show some data on the page. However, when the export option is done, I need to take that dataset and change the order of certain fields. Then, I can do the export. This export has been used so far and its layout cannot be modified as several developers have tools that are bound on that. How can I change the order of certain fields?

If your using ADO.NET 2.0 then you can change the position of a column using the DataColumn.SetOrdinal method.

If your using ADO.NET 1.1 then you will have to code a method to process through the data and build a copy with the columns in the desired order.
Michael McLain
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform