This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, When I remove an item from the collection in the property grid, I get a ArgumentOutOfRangeException within the PassThroughPropertyInfoAdapter (it is wrapped in a TargetInvocationException). It is difficult to track down the cause as the exception does not give much information - the stack trace is a single line (e.g. "at System.Collections.Generic.List`1.get_Item(Int32 index)"). I have checked all possible points of failure in my code (it is late, so I could have missed something). Do you have any pointers or likely reasons why I would get an exception like this? |
|
|
Hi Dennis, I can't think of any reason why you would get an exception like that. It looks like something is trying to access an item beyond the end of the list -- as though something is keeping a node around that points to e.g. index 5 instead of shuffling it down to index 4. The stack trace around the TargetInvocationException may give you more of an idea. Can you also check whether the problem still occurs on the latest nightly build of WPF Elements? We did at one point have an issue with collections that related to holding incorrect indexes, though it manifested as an InvalidCastException rather than an ArgumentOutOfRangeException, and this is now fixed. If you do still see it on the current nightly, and the TIE stack trace doesn't suggest anything to you, then could you put together a small repro project so we can try to determine if the problem lies within the PropertyGrid control? You can attach a zip file via the Options tab. Thanks! |
|
|
It certainly sounds like a PropertyGrid refresh issue, e.g., the contro is still has a node for an item that is now removed from the collection. Step-through the code, I can see that the collection has been updated correctly. I will integrate the latest nightly build and see if that resolves the issue. Thanks Ivan. |
|