RadTreeListView not sync with ICollectionView

10 posts, 0 answers
  1. Simone
    Simone avatar
    10 posts
    Member since:
    Aug 2015

    Posted 25 Oct 2019 Link to this post

    Hi,

    I'm binding the ItemSource with ListCollectionView ....I noted that changing the selection on TreeListView the CurrentItem is not updated. Also the MoveCurrentTo method doesn't work. I use the some procedure with RadGridView and works fine!

    How I can resolve this issue?

     

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1075 posts

    Posted 30 Oct 2019 Link to this post

    Hi Simone,

    The reason for this difference in behavior is that the RadTreeListView internally generates a HierarchicalCollectionView, while the RadGridView uses a QueryableCollectionView. Currently, the former does not support synchronization with its current item through the CollectionView API, even though synchronization with the selection should be available.

    With that said, I've prepared a small sample project which demonstrates how to move the current item by actually changing the SelectedItem of the control.

    Please have a look and let me know if a similar approach would work for you.

    Regards,
    Dilyan Traykov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Simone
    Simone avatar
    10 posts
    Member since:
    Aug 2015

    Posted 31 Oct 2019 in reply to Dilyan Traykov Link to this post

    Hi Dilyan,

    Thanks for your support. I noted that you have a single type WarehouseItem for WarehouseItems and Items. I've already used your approach but I have two different type for ItemSources and Items... Can be this the problem? Is there a workaround for this issue?

  4. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1075 posts

    Posted 01 Nov 2019 Link to this post

    Hi Simone,

    The RadTreeListView control should only be used when dealing with homogeneous data. If you have different types for the ItemsSource and those objects' child items, you'd better use a RadTreeView or a hierarchical RadGridView control.

    Please let me know whether switching to any of these controls will be possible for you.

    Regards,
    Dilyan Traykov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  5. Simone
    Simone avatar
    10 posts
    Member since:
    Aug 2015

    Posted 04 Nov 2019 in reply to Dilyan Traykov Link to this post

    Hi Dilyan,

    I prefer to stay with the current data structure, why the other components I don't get what I expect. Do you have any other workaround? Will there be an update of the component?

    Thank you very much!

  6. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1075 posts

    Posted 05 Nov 2019 Link to this post

    Hi Simone,

    I'm afraid that the RadTreeListView control is designed to work with homogeneous data and some of its functionality may not behave as expected if using a heterogeneous source. You can have a look at the following thread which discusses a similar requirement.

    Unfortunately, we do not have any plans for introducing support for such a source. If you would, however, provide more details on your current setup and exact requirement, I'd be more than happy to try and suggest a viable solution for your particular scenario.

    Regards,
    Dilyan Traykov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  7. Simone
    Simone avatar
    10 posts
    Member since:
    Aug 2015

    Posted 13 Nov 2019 in reply to Dilyan Traykov Link to this post

    Hi Dilyan, 
    Thanks in advance for your help. In attached you can find an example of my project, please take a look and let me know if you have any suggestion.

    Rename the RadTreeListView.jpg as RadTreeListView.zip for the source code :)

  8. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1075 posts

    Posted 15 Nov 2019 Link to this post

    Hi Simone,

    Thank you for the provided project.

    The suggested approach of binding the SelectedItem property seems to work fine in the attached project. I've updated the sample project to demonstrate this approach in this setup.

    Can you please have a look and let me know if something similar would work for you?

    Regards,
    Dilyan Traykov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  9. Simone
    Simone avatar
    10 posts
    Member since:
    Aug 2015

    Posted 20 Nov 2019 Link to this post

    Hi Dilyan,

    The big problem is that is not possible to navigate in the grid with the keyboard. Also in your project is not possible to do this. 

  10. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1075 posts

    Posted 20 Nov 2019 Link to this post

    Hi Simone,

    This behavior is once more caused by the heterogeneous source which is provided and the difference between the types of the Desk and Book objects.

    A simple fix for achieving the desired behavior, however, is to have the Book class inherit from Desk:

    public class Book : Desk
    I do hope you find such an approach applicable.

    Regards,
    Dilyan Traykov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top