I have a gridview in which the data is bind from a arraylist in page_load function
Node node = new Node();
node.buildTree("all", "arraylist");
al = node.getArrayList();
GridView2.DataSource = al;
GridView2.DataBind();
I want to enable the update mode for this gridview, but I only know using sqldatasource to do this. the gridview must use
DataSourceID="SqlDataSource1"
to link up the datasource. But after I use
GridView2.DataSource = al;
GridView2.DataBind();
The gridview restrict me to use DataSourceID="SqlDataSource1", ask me to remove one defintion.
How do I enable update mode for this grid?
if you want use update mode of grid view this link help you
http://www.aspdotnet-suresh.com/2011/02/how-to-inserteditupdate-and-delete-data.html
but in other way you can use ItemCommand event. In this case you set command for your field ‘UpdateCommand’ and then in ItemCommand event, check if CommandName is ‘UpdateCommand’ go to other page for update record.