Set the TreeListViewItem visibility

3 posts, 0 answers
  1. wang
    wang avatar
    3 posts
    Member since:
    Oct 2017

    Posted 24 Jul 2019 Link to this post

    Can i set the TreeListViewItem visibility to visible or hide, when i use the treelistiview in Virtualization model.

    I want to use this method to search something,or may be another?

  2. Dimitar Dinev
    Admin
    Dimitar Dinev avatar
    72 posts

    Posted 24 Jul 2019 Link to this post

    Hi Wang,

    It is not recommended to modify the rows' visibility as it will most likely result in the appearance of blank spaces into your TreeListView or other unpredictable behavior. I wouldn't suggest working with the visual elements when the control is virtualized due to the containers recycling mechanism. Please, take a look at the UI Virtualization article.

    What I can suggest is to utilize a filtering approach to determine which items should be visible.

    Attached, you can find a sample project in which I've demonstrated this approach. What I've done is I added a IsVisible property which determines whether an item should be visible and not setting a Visibility directly. Please, review the project and let me know if you find it helpful.

    Regards,
    Dimitar Dinev
    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. wang
    wang avatar
    3 posts
    Member since:
    Oct 2017

    Posted 24 Jul 2019 Link to this post

    OK,thanks a lot , I will try it . 

Back to Top