Hi,
I'm working on a project which uses the RadGrid from the classic controls.
Basically, the scenario is this. When the user clicks on an edit button for a row of the RadGrid, the panel which contains the RadGird is made invisible, and another panel with an assortment of textboxes and comboboxes is made visible with details of that grid row item populating thos controls. There is also a delete button on that panel, which delete that item in the database when clicked.
The problem arises when the grid is reloaded after that delete. Following the delete button being clicked, the grid's panel is made visible again and the grid is rebound. If I then click on one of the edit buttons for a row in the grid, the following error is thrown:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex]
Telerik.WebControls.GridItemCollection.get_Item(String hierarchicalIndex) +103
Telerik.WebControls.GridDataItemCollection.get_Item(String hierarchicalIndex) +37
Telerik.WebControls.RadGrid.get_EditItems() +215
Telerik.WebControls.RadGrid.SaveEditIndexState(String newValue) +95
Telerik.WebControls.GridItem.set_Edit(Boolean value) +82
Telerik.WebControls.GridCommandEventArgs.ExecuteCommand(Object source) +236
Telerik.WebControls.RadGrid.OnBubbleEvent(Object source, EventArgs e) +191
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
Telerik.WebControls.GridItem.OnBubbleEvent(Object source, EventArgs e) +165
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +111
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +176
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
Any help would be appreciated. Previous searches of this forum show others have had the same problem and not resolved it.
Cheers
I'm working on a project which uses the RadGrid from the classic controls.
Basically, the scenario is this. When the user clicks on an edit button for a row of the RadGrid, the panel which contains the RadGird is made invisible, and another panel with an assortment of textboxes and comboboxes is made visible with details of that grid row item populating thos controls. There is also a delete button on that panel, which delete that item in the database when clicked.
The problem arises when the grid is reloaded after that delete. Following the delete button being clicked, the grid's panel is made visible again and the grid is rebound. If I then click on one of the edit buttons for a row in the grid, the following error is thrown:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex]
Telerik.WebControls.GridItemCollection.get_Item(String hierarchicalIndex) +103
Telerik.WebControls.GridDataItemCollection.get_Item(String hierarchicalIndex) +37
Telerik.WebControls.RadGrid.get_EditItems() +215
Telerik.WebControls.RadGrid.SaveEditIndexState(String newValue) +95
Telerik.WebControls.GridItem.set_Edit(Boolean value) +82
Telerik.WebControls.GridCommandEventArgs.ExecuteCommand(Object source) +236
Telerik.WebControls.RadGrid.OnBubbleEvent(Object source, EventArgs e) +191
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
Telerik.WebControls.GridItem.OnBubbleEvent(Object source, EventArgs e) +165
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +111
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +176
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
Any help would be appreciated. Previous searches of this forum show others have had the same problem and not resolved it.
Cheers