Hi,
I have a sql data source that is a join from three different tables for the display of information. For the update and delete commands it only has to update one table. The reorder works great. However, the delete command comes back with javascript popup that says:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
So I tried debugging the page (I am using VWD 2005). I copied the stack trace that was printed out below:
System.ArgumentOutOfRangeException was unhandled by user code
Message="Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index"
Source="mscorlib"
ParamName="index"
StackTrace:
at System.Collections.ArrayList.get_Item(Int32 index)
at AjaxControlToolkit.ReorderList.PrepareRowValues(ReorderListCommandEventArgs e, IDictionary& oldValues, IOrderedDictionary& newValues, IDictionary& keys, Boolean isAddOperation) in d:\E\AjaxTk-AjaxControlToolkit\Release\AjaxControlToolkit\ReorderList\ReorderList.cs:line 1673
at AjaxControlToolkit.ReorderList.PrepareRowValues(ReorderListCommandEventArgs e, IDictionary& oldValues, IOrderedDictionary& newValues, IDictionary& keys) in d:\E\AjaxTk-AjaxControlToolkit\Release\AjaxControlToolkit\ReorderList\ReorderList.cs:line 1650
at AjaxControlToolkit.ReorderList.HandleDelete(ReorderListCommandEventArgs e) in d:\E\AjaxTk-AjaxControlToolkit\Release\AjaxControlToolkit\ReorderList\ReorderList.cs:line 1397
at AjaxControlToolkit.ReorderList.OnBubbleEvent(Object source, EventArgs args) in d:\E\AjaxTk-AjaxControlToolkit\Release\AjaxControlToolkit\ReorderList\ReorderList.cs:line 1550
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at AjaxControlToolkit.ReorderListItem.OnBubbleEvent(Object source, EventArgs args) in d:\E\AjaxTk-AjaxControlToolkit\Release\AjaxControlToolkit\ReorderList\ReorderListItem.cs:line 138
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
This appeared to be something in the control to me, but I am relatively new to asp.net and the ajax toolkit. I have searched this forum and several others and do not see any mention of this error, so any help would be appreciated.
Thanks.