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

Bind ADO.NET object to TreeListView cause sub items refersh problem

5 Answers 93 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Jane
Top achievements
Rank 1
Jane asked on 02 Jun 2011, 12:41 PM
Recently, I've been working on a prototype to binding ADO.NET object to RadTreeListView for our project.
I have one DataSet which contains one DataTable. This table has 3 columns: ID, ParentID and Description. Create relation for this table between ID and ParentID columns. In another word, this is a self-referenced table.
Now create one DataView upon this DataTable and add needed filter for it.
1. Use the data set as the DataSource of RadTreeListView
2. Binding data view to ItemSource of RadTreeListView
3. Binding relation to ItemsSource of ChileTableDefinitions
See following codes:
<telerik:RadTreeListView Name="radTreeListView_left" DockPanel.Dock=

"Left" ItemsSource="{Binding TreeVM}" SelectedItem="{Binding SelectedEntityRow}">

 

 

<telerik:RadTreeListView.ChildTableDefinitions>

 

  <telerik:TreeListViewTableDefinition ItemsSource="{Binding Source=DataSetVM, Path=TreeRelation}"/>

 

</telerik:RadTreeListView.ChildTableDefinitions>

 

 

</telerik:RadTreeListView>

 

 

The hierarchy data can be display correctly in TreeListView. Since I am binding the data view to UI with Two Way mode, so I think if I detele one row in data view, the UI will be updated accordingly. But actually, only delete a root item can refresh correctly. Delete sub items on UI cannot refersh, they need additional refersh manually. For example, I have following structure in TreeListView:
Group 1
   |_Item 1
   |_Item2
Group 2
Delete Group2 in DataSet, UI will remove Group 2 automatically. But if I remove Item 2 in DataSet, UI will not update unless I refersh UI manually. 
So my question is does anybody know how to solve this sub items refersh problem? This is very important for us to decide if choose Telerik or not. So please give any clue you may have.

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 07 Jun 2011, 08:50 AM
Hello,

 Can you post more info about the treelist version at your end? 

Kind regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jane
Top achievements
Rank 1
answered on 07 Jun 2011, 09:24 AM
I am using version 2011.1.419.35.

0
Nedyalko Nikolov
Telerik team
answered on 10 Jun 2011, 03:15 PM
Hello Jane,

I've tried to reproduce the reported issue, unfortunately to no avail.
Could you please send me your sample project, which I can debug on my side in order to see what is going on?

Regards,
Nedyalko Nikolov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jane
Top achievements
Rank 1
answered on 13 Jun 2011, 09:49 AM
Thank you for your help.
I have sloved this problem by calling AcceptChanges() on modified datatable. Like below:

TreeVM

 

 

.Table.AcceptChanges();
After calling above sencence when I removed one row in data table, the treelistview UI can remove the corresponding row automatically.

So I guess this shoule be the reason of my problem. I am just curious that why WPF standard control TreeView don't need to add above scence after remove one row in data table, the UI of TreeView can update as well.

0
Nagaraj
Top achievements
Rank 1
answered on 15 Sep 2013, 09:42 AM
Hi Jane,

i am trying to assigning the dataset to the treelistview, but i am getting errors.
can you send me sample code that how you are assigning the dataset to the treelistview..


Tags
TreeListView
Asked by
Jane
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Jane
Top achievements
Rank 1
Nedyalko Nikolov
Telerik team
Nagaraj
Top achievements
Rank 1
Share this question
or