How to give a number of columns is not fixed datatable, add a new column to gene

The stored procedure returns a recordset to generate datatable, fields and data are as follows:

TYPE 2013/09/01 2013/10/01 2013/11/01 Usage
The gasket 3600580023452
The 2013/09/01 2013/10/01 2013/11/01 is a dynamic column, the column name and number as the raw data and different, there may be 4 to 6 columns, or any other date month.
Think of the following datatable, how to write c# code? Thank you
TYPE 2013/09/01 2013/10/01 2013/11/01 Usage Sep'13_QTY Oct'13_QTY Nov'13_QTY
36005800234527200 116004690.

Started by Eli at November 22, 2016 - 12:32 AM

dt.Columns.Add("");

Posted by Ellen at November 29, 2016 - 1:26 AM

Two read, read one time dynamic column, a read fixed. Then the two reads as a data source in datagridview.datasource.

Posted by Lori at December 01, 2016 - 2:19 AM

2013/09/01 2013/10/01 2013/11/The 01 is the dynamic column of the records in a table table1, Sep'13_QTY Oct'13_QTY Nov'13_QTY these data into a table table2,
Then use dataadapter.fill to read the data in the talbe1 into dataset, and then reads data from table2 to dataset, the final import data and GridView in dataset.table

Posted by Lori at December 11, 2016 - 2:36 AM

Sep'13_QTY Oct'13_QTY Nov'13_QTY
These columns are originally not exist, is obtained by multiplying the number of the original usage,

Posted by Eli at December 16, 2016 - 3:33 AM

You put these data into another table is not good. Created when a table, create the data to the table. I think this is the most simple method

Posted by Lori at December 19, 2016 - 4:04 AM

I just told you, your columns in the table on the move, and do not want to sort, then let the column can only form a regular plus, don't let him mess up. At least I'm lazy do.

Posted by Lori at December 29, 2016 - 5:03 AM