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

"Object does not match target type" error while editing radtreelistview

2 Answers 104 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Sharada
Top achievements
Rank 1
Sharada asked on 21 Mar 2011, 11:39 AM
Hi,
I'm  trying to display two datatypes in a RadTreeListView through XML. The first datatype, 'Director', with two properties: 'Name', and a property 'Function' . Function contains two properties i.e Name and FunctionType.


--------------------------------------------------------------------------------------------------
public
class Director
{
    public string Name{ get; set; }
    public ObservableCollection<Function > Function { get; set; }
}
 
public class Function
{
    public string Name { get; set; }
    public string FunctionType{ get; set; }
 }

 

 

 

<Window.Resources>

 

 

 

<local:RadTreeListXmlDataSource x:Key="TreeSource" Source="TestData.xml" />

 

 

 

 

 

</Window.Resources>

 

 

 

 

 

 

 

  <telerik:RadTreeListView CellEditEnded="RadTreeListView1_CellEditEnded" x:Name="RadTreeListView1" RowIsExpandedChanged="RadTreeListView1_RowIsExpandedChanged"

 

 

 

 

  AutoGenerateColumns="False" ItemsSource="{StaticResource TreeSource}">

 

 

 

 

  <telerik:RadTreeListView.ChildTableDefinitions>

 

 

 

 

  <telerik:TreeListViewTableDefinition ItemsSource="{Binding Items}" />

 

 

 

 

  </telerik:RadTreeListView.ChildTableDefinitions>

 

 

 

 

  <telerik:RadTreeListView.Columns>

 

 

 

 

  <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" />

 

 

 

 

  <telerik:GridViewDataColumn DataMemberBinding="{Binding Source}" Header="Type" />

 

  

 

</telerik:RadTreeListView.Columns>

 

 

 

 

</telerik:RadTreeListView>

 




-------------------------------------------------------------------------------------------------

I was able to edit the Director's properties but when I tried to edit Function's properties i.e Funnction Name ,
I got an error saying "Object does not match target type".
Can you please provide a sample for the above functionality?


2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 21 Mar 2011, 12:51 PM
Hello,

 This is already fixed in our latest official release - Q1 2011. 

Regards,
Vlad
the Telerik team
0
Sharada
Top achievements
Rank 1
answered on 22 Mar 2011, 05:05 AM
Thanks for the reply.
Tags
TreeListView
Asked by
Sharada
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Sharada
Top achievements
Rank 1
Share this question
or