Error in editing gridview
-
I databinded the gridview to datatable and displayed the fields.But the edit of gridview is not working..I am getting the following error. 'The GridView 'GridView2' fired event RowEditing which wasn't handled.' Can anybody help me with this?
-
I databinded the gridview to datatable and displayed the fields.But the edit of gridview is not working..I am getting the following error. 'The GridView 'GridView2' fired event RowEditing which wasn't handled.' Can anybody help me with this?
For this You have to register Gridview2_RowEditing Event in Code behind. For example : protected void GridView2_RowEditing(object sender, GridViewEditEventArgs e) { //Write your editing Code here. } And for cancelling editing, You need to register Gridview2_RowCancellingEdit event. For Example : protected void GridView2_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { }. You can visit MSDN for further information http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowediting.aspx[^] Hope this will make sense to you. Ankit Zaveri