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

6 posts, 0 answers
  1. Jane
    Jane avatar
    1 posts
    Member since:
    Jun 2011

    Posted 02 Jun 2011 Link to this post

    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.

  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 07 Jun 2011 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jane
    Jane avatar
    4 posts
    Member since:
    May 2011

    Posted 07 Jun 2011 Link to this post

    I am using version 2011.1.419.35.

  5. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 10 Jun 2011 Link to this post

    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
  6. Jane
    Jane avatar
    4 posts
    Member since:
    May 2011

    Posted 13 Jun 2011 Link to this post

    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.

  7. Nagaraj
    Nagaraj avatar
    1 posts
    Member since:
    Sep 2013

    Posted 15 Sep 2013 Link to this post

    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..


Back to Top
UI for WPF is Visual Studio 2017 Ready