468,247 Members | 1,325 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,247 developers. It's quick & easy.

Index was out of range. Must be non-negative and less than the sizeof the collection.

I've been trying to correct this error for approx 2 days and am
having
no luck.

In a page's button clickevent , i want to bind a infragistic grid
according to two dropdown value.
At the first click it runs correctly, but when change the index of
dropdown and again click that button,
this gives an error message.

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: Index was out
of range. Must be non-negative and less than the size of the
collection.
Parameter name: index

Exception details
System.Collections.CollectionBase.System.Collectio ns.IList.get_Item(Int32
index) +2435961

Infragistics.WebUI.UltraWebGrid.KeyedObjectCollect ionBase.GetItem(Int32
index) +5

Infragistics.WebUI.UltraWebGrid.KeyedObjectCollect ionBase.InternalRemoveAt(Int32
index) +17

Infragistics.WebUI.UltraWebGrid.ValueListItemsColl ection.RemoveAt(Int32
index) +68

Infragistics.WebUI.UltraWebGrid.ValueListItemsColl ection.System.Web.UI.IStateManager.LoadViewState(O bject
savedState) +317

Infragistics.WebUI.UltraWebGrid.ValueList.System.W eb.UI.IStateManager.LoadViewState(Object
savedState) +121

Infragistics.WebUI.UltraWebGrid.UltraGridColumn.Lo adViewState(Object
savedState) +203

Infragistics.WebUI.UltraWebGrid.UltraGridColumn.Sy stem.Web.UI.IStateManager.LoadViewState(Object
savedState) +11

Infragistics.WebUI.UltraWebGrid.ColumnsCollection. System.Web.UI.IStateManager.LoadViewState(Object
savedState) +1894

Infragistics.WebUI.UltraWebGrid.UltraGridBand.Syst em.Web.UI.IStateManager.LoadViewState(Object
savedState) +558

Infragistics.WebUI.UltraWebGrid.BandsCollection.Sy stem.Web.UI.IStateManager.LoadViewState(Object
savedState) +493

Infragistics.WebUI.UltraWebGrid.UltraGridLayout.Sy stem.Web.UI.IStateManager.LoadViewState(Object
savedState) +725
Infragistics.WebUI.UltraWebGrid.UltraWebGrid.LoadV iewState(Object
savedState) +118
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState)
+186
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList
childState) +136
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState)
+224
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList
childState) +136
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState)
+224
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList
childState) +136
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState)
+224
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList
childState) +136
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState)
+224
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList
childState) +136
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState)
+224
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList
childState) +136
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState)
+224
System.Web.UI.Page.LoadAllState() +439
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1092

Oct 20 '08 #1
0 1212

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Andrew MacIntyre | last post: by
1 post views Thread by Arben Kryeziu | last post: by
3 posts views Thread by Ken | last post: by
13 posts views Thread by Chameleon | last post: by
35 posts views Thread by erikwickstrom | last post: by
85 posts views Thread by Russ | last post: by
2 posts views Thread by Georgy Panterov | last post: by
1 post views Thread by Steffen Stellwag | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.