This is a migrated thread and some comments may be shown as answers.

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

3 Answers 49 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 18 Feb 2011, 08:54 AM
This may be the exact same issue as http://www.telerik.com/community/forums/silverlight/treelist/error-when-editing-cell-child.aspx

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: http://dl.dropbox.com/u/28253/TreeListViewIssue.zip

Thanks,
Stephen

3 Answers, 1 is accepted

Sort by
0
Accepted
IxReveal
Top achievements
Rank 1
answered on 22 Feb 2011, 05:11 PM
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
0
Accepted
Pavel Pavlov
Telerik team
answered on 23 Feb 2011, 02:57 PM
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!
0
Stephen
Top achievements
Rank 1
answered on 24 Feb 2011, 05:40 AM
Yes, the latest internal build seems to have fixed the problem, without any further modifications needed in the sample code.

Thanks!
Tags
TreeListView
Asked by
Stephen
Top achievements
Rank 1
Answers by
IxReveal
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Stephen
Top achievements
Rank 1
Share this question
or