In aspx.cs code I have created a DataTable via program code and I could bind to the GridView by this code:
grid1.DataSource = dsOut;
grid1.DataBind();
dsOut above has variable number of columns and unknown column names (names of the columns are determined in the program code).
The content shows in the GridView correctly. How can I make the GridView editable so that after the Submit button is pressed --
Thank you.
I have used editable gridview before but there I used the bound source (bound to a database table) -- there Edit/Update was fairly easy (as they way mentioned in the above links...).
Is there any alternate design that will let me update the dataSet (NOT bound directly to a database table) via a web form..?
Kaushal Arora
Is your columns same every time or they will b changing every time you bind the grid with DataSet.
toooki
ASKER
The number of columns will be the same. But the column names are not like Id/Name/Address..
The column names are like Feb022011, Feb092011, Feb162011, Mar032011, etc.
But yes the column names will be the same...
(I get the column names by somewhat transposing a table from the database -- so the column names are like this)
I have used editable gridview before but there I used the bound source (bound to a database table) -- there Edit/Update was fairly easy (as they way mentioned in the above links...).
But the GridView is bound to a dataSet.
I cannot provide the column names:
<asp:GridView ID="grid1" runat="server">
</asp:GridView>
Is there any alternate design that will let me update the dataSet (NOT bound directly to a database table) via a web form..?