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
675
ultragrid.DataSource - "Index was outside the bounds of the array."
posted

I'm getting "Index was outside the bounds of the array." error when setting the datasource of an ultragrid. I read this has to do with threading, however, I'm not familiar enough with the concept to see where I'm going wrong.

What do I do to correct this?

Thank you.

Parents
  • 469350
    Offline posted

    Hi,

    This could be a threading issue. Is your application using multiple threads? If so, then I would strongly advise against using multiple threads and databinding together. When you bind a control, you do not have any control over the communication between the control and it's data source and it is therefore not possible to properly marshal the data across threads.

    If not, then my guess is that the exception is occurring in one of the events of the grid like InitializeLayout or InitializeRow where you are attempting to reference a column or cell that doesn't exist, yet.

    Can you post the call stack of the exception?

Reply Children