Datagrid Update Command
-
Hi I am using ASP.NET1.1 with Back end VB.NET Code. I am trying to used Update command in Datagrid. But i am getting error in this line.. Private Sub DataGrid1_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.UpdateCommand Dim eId As String eId = DataGrid1.DataKeys(e.Item.ItemIndex) 'This line End Sub Error: "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" i want to know there i done Mistke Mkanchha
-
Hi I am using ASP.NET1.1 with Back end VB.NET Code. I am trying to used Update command in Datagrid. But i am getting error in this line.. Private Sub DataGrid1_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.UpdateCommand Dim eId As String eId = DataGrid1.DataKeys(e.Item.ItemIndex) 'This line End Sub Error: "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" i want to know there i done Mistke Mkanchha
I think the Datagrid is not returned by the function UpdateCommand. Hence it's throwing the error. Do check whether it returns any DataGrid1_UpdateCommand.
Regards, Satips.