Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
Index must be within the bounds of the List. Parameter name: index error on webdatagrid databind
posted

Hi,

I am binding a webdatagrid with a dataset with several columns.

When i call the grid.databind for the firmst time to bind the dataset to the grid i get the below error

Index must be within the bounds of the List. Parameter name: index.

but the data will be bound and show on the grid.

Subsequent databinds do not give error.

Below is the stack trace of the error during databind

at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.List`1.Insert(Int32 index, T item)
at Infragistics.Web.UI.GridControls.VisibleItemsEnumerator.AdjustVisibleIndices(IVisibleItem item, Int32 newIndex)
at Infragistics.Web.UI.GridControls.ControlDataField.set_VisibleIndex(Int32 value)
at Infragistics.Web.UI.GridControls.GridField.set_VisibleIndex(Int32 value)
at Infragistics.Web.UI.GridControls.WebDataGrid.CopyFields()
at Infragistics.Web.UI.GridControls.WebDataGrid.FillFields()
at Infragistics.Web.UI.GridControls.WebDataGrid.DataBind()

Can someone please explain why this might be happening?

Thanks

Niranjan

Parents
No Data
Reply
  • 25665
    Offline posted

    Hello Niranjan,

    Thank you for contacting Infragistics!

    I have done some looking into this matter and I have been unable to reproduce this behavior. I have some follow up questions concerning this matter:

    What version and service release are you using? What browsers are you using? What properties and behaviors are you using for the WebDataGrid? How are you binding your data?

    Looking forward to hearing from you.

Children