Error when Editing Child Node (While Using Converter for Multiple Object Types)

4 posts, 2 answers
  1. Stephen
    Stephen avatar
    5 posts
    Member since:
    Feb 2011

    Posted 18 Feb 2011 Link to this post

    This may be the exact same issue as

    I don't know what the solution was in that post, and I'm doing something a bit weird with an IValueConverter, so I figured it was worth starting a new post. If the code in the above post will solve my problem, please send it my way..

    I am using a IValueConverter to push multiple types of objects into my TreeListView. Some properties of the objects are common and some are not. When I try to edit the parent node, it works fine. When I edit the child node, I get a System.Reflection.TargetException.

    I have attached a screenshot of the error and a very small/simple project that demonstrates the error. Just expand the parent node and try to click on the child node properties for editing.

    Looks like I can't attach the project directly, so here's a link:

  2. Answer
    IxReveal avatar
    7 posts
    Member since:
    Jan 2011

    Posted 22 Feb 2011 Link to this post

    Hey there,

        I had the same problem getting the TargetInvocationException while using the TreeListView and displaying heterogenous objects (different types of objects).  Only when I downloaded the latest Hotfix DLLs was I able to actually get this working.  The way that I got this to work after updating to the latest DLLs is to use a GridViewColumn and specify the CellTemplate and CellEditTemplate.  The CellEditTemplate is actually using a CellTemplateSelector for which I target the different properties of each object.  I haven't tried this approach using an IValueConverter; but I wanted to let you know that it is now possible.

    Best Regards
  3. DevCraft R3 2016 release webinar banner
  4. Answer
    Pavel Pavlov
    Pavel Pavlov avatar
    2039 posts

    Posted 23 Feb 2011 Link to this post

    Hello Stephen,

    I got your project, then I took the dlls from our latest internal build. This seemed to fix the problem .

    Please give the latest dlls a try. They should be available for download in your client.Net account.

    Best wishes,
    Pavel Pavlov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  5. Stephen
    Stephen avatar
    5 posts
    Member since:
    Feb 2011

    Posted 23 Feb 2011 Link to this post

    Yes, the latest internal build seems to have fixed the problem, without any further modifications needed in the sample code.

Back to Top