ASP.NET - Build a DataTable from scratch

I have some data that I would like to display in a gridview so I can take advantage of the formatting features that it offers.  However, the data that I currently have from the database is not organized in a way that I would like to display it in the gridview.  I want to reorganize it and prepare a new DataTable to bind to the gridview control.

What is the process that I would go through to create a new DataTable, define its column names, create the individual DataRows and start adding them to the DataTable?
josephdaviskcrmAsked:
Who is Participating?
 
spprivateCommented:
Anyway if that is what you want here is how
http://msdn.microsoft.com/en-us/library/system.data.datatable.aspx
0
 
spprivateCommented:
what you mean by not organized.is it the sequence or what.
I would rather write the query in such a way i need and let the grid do the rest
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.