In my ASP.NET code in C# (VS 2008) I have created a gridView and here is the .aspx code:
<asp:GridView ID="grid1" runat="server">
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;
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 --
protected void btn1_Click(object sender, EventArgs e)
DataTable dt = (DataTable)grid1.DataSource;
The above works. I can get the data in "dt" but all I need it seems to make the GridView editable..