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
1105
Column bind
posted

Hey folks

I'm attempting to track down an exception we're seeing using ultrawingrid with insert columns containing formulas.

The exception we're seeing ("System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection") is typically the result of a threading issue.  I've verified that in our case we are not doing any threading ( so everything is on the UI thread).

This isn't our exact code, but theoreitcally should there be an issue with executing the following consecutively

1. Add unbound column to grid with a formula

2. Call ultracalcmanager.Recalc(-1)

3. Add column of the same key to the datatable bound to the grid (via ...table.Columns.Add())

4. Call ultracalcmanager.Recalc(-1)

Admittedly the order of these calls is a bit odd.  But assume for the moment they have to be this way.  It's my understanding that none of the above calls (note I'm calling recalc with the -1 parameter) should introduce any threading.

I know this isn't much to go on and very hypothetical, but is there anything I might be missing here?

 

Thanks,

Chris Rowland

 

 

I will admit this sequence of steps seems a bit odd, but for the sake of argument assume we have to follow this sequence.