I am using a radGrid with UserControl to handle editing and inserts.
I am binding the grid at runtime, similar to the example on http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultvb.aspx
After executing the insert command, I would like the grid to return to default mode (i.e. leave insert mode), but have been unable to do this. I am using the UpdateCommand - code as below. The item is successfully added to the database, but I get a jscript error
"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Insert item is available only when grid is in insert mode."
Basically, I am looking for the ASP.Net gridview equivalent of edititemindex = -1. Are you able to assist.
Thanks
Ben
Private Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand
I am binding the grid at runtime, similar to the example on http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultvb.aspx
After executing the insert command, I would like the grid to return to default mode (i.e. leave insert mode), but have been unable to do this. I am using the UpdateCommand - code as below. The item is successfully added to the database, but I get a jscript error
"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Insert item is available only when grid is in insert mode."
Basically, I am looking for the ASP.Net gridview equivalent of edititemindex = -1. Are you able to assist.
Thanks
Ben
Private Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand
Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
Dim userControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)
strID =
CType(userControl.FindControl("txtID"), TextBox).Text
DataComponent.SaveAsset(strID)
RadGrid1.MasterTableView.IsItemInserted = False
Me.RadGrid1.Rebind()
End Sub