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
209
ArgumentOutOfRangeException when removing a DataRow
posted

Hello,

I have an UltraWinTree bound to a table in a custom DataSet. This DataSet references itself so I get two lvels of tree nodes. When I remove a row that corresponds to a node on the second level an ArgumentOutOfRangeException is thrown from the method

Infragistics4.Win.UltraWinTree.v14.1.dll!Infragistics.Win.UltraWinTree.VisibleNodesManager.GetDescendantCount(int parentVisibleIndex) Line 184 + 0xe bytes    C#

I have tried to surround the row-removal with tree.BeginUpdate()/tree.EndUpdate() but to no effect. The only workaround I have found is to set the DataSource property to null before, and back to the DataTable after the call.

Is there a better way?

  • 18495
    posted

    Hello Wolfgang,

    Has this issue been resolved?  If so, please mark as answers any posts that helped you resolve the issue or make a new post describing how you resolved the issue.

    Please let me know if you have any other questions about this.

  • 469350
    Offline posted

    Hi Wolfgang,

    I tried this out using our recursive data binding sample and I could not get the exception to occur. I am attaching my modified sample here so you can see if it works for you.

    If you get the exception using my sample, then maybe this is a bug in the version of the Infragistics assemblies on your machine and you just need to get the latest service release.

    If you do not get the exception, then there's something else going on in your application. In which case, can you post a small sample project demonstrating the exception?

    DataBinding (Recursive) CS.zip