In my datagrid , i placed delete command
private void DataGrid1_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { DataRow r; r = dt.Rows[e.Item.ItemIndex]; r.Delete(); cb = new OleDbCommandBuilder(da); da.Update(ds,"contractexperience"); DataGrid1.EditItemIndex=-1; binddata(); }
It is showing an exception that : there is no row at postion 1,2,3....
I have 8 columns in my datagrid , which ever row i select for deleting , it is saying there is no row at that position
Is there any thing to change, can any body help me pls...
|
| Author: Harsha 16 Jan 2008 | Member Level: Gold | Rating: Points: 2 |
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.datagrid.deletecommand(VS.80).aspx
|