Hiding TreeListView items

12 posts, 0 answers
  1. Juan
    Juan avatar
    13 posts
    Member since:
    Jun 2010

    Posted 08 Jul 2010 Link to this post

    Hello!
    How can I hide items in TreeListView control ? I'm binding list of objects to it and don't want to dipslay all of them.
    Thanks
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 08 Jul 2010 Link to this post

    Hi,

     Why not filter your collection before assigning ItemsSource? For example:

    RadTreeListView1.ItemsSource = Customers.Where(c=>c.City == "London").ToList();

    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. DevCraft banner
  4. Juan
    Juan avatar
    13 posts
    Member since:
    Jun 2010

    Posted 08 Jul 2010 Link to this post

    I'm using that object's data, so I can't remove them from list. I think that Visibility property may help, but don't know how to use it in that case.
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 08 Jul 2010 Link to this post

    Hello,

     Unfortunately I'm not sure what are these object's data - can you clarify why you cannot apply filter?

    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
  6. Juan
    Juan avatar
    13 posts
    Member since:
    Jun 2010

    Posted 08 Jul 2010 Link to this post

    Objects in list have hierarchical tree structure. I tried to change Visibility property in separate cell and it worked. But even if I'll change Visibility property in all cells, there will be free space between rows.
      <telerikNavigation:RadColumn  Header="Line Number" >
           telerikNavigation:RadColumn.CellTemplate>
               <DataTemplate>
    <TextBlock Text="{Binding LineNumber,Mode=OneTime}"
    Visibility="{Binding IsVisible, Converter={StaticResource visibilityConverter}}" />
               </DataTemplate>
           </telerikNavigation:RadColumn.CellTemplate>
       </telerikNavigation:RadColumn>
  7. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 08 Jul 2010 Link to this post

    Hello Juan,

    Binding the Visibility property is not recommended because due to the virtualization the containers of the items are re-used and the container properties are not cleaned when a new busines object is assigned to them.

    So the proper way is to filter the data collection and not to touch the item containers. Byt the way if you are using the old CTP version of the TreeListView it is recommended to upgrade to the new one (available after Q2.Beta), since the old one is no longer supported.

    Sincerely yours,
    Valentin.Stoychev
    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
  8. Kinjal
    Kinjal avatar
    12 posts
    Member since:
    Jan 2007

    Posted 20 Sep 2010 Link to this post

    Hi Valentin,

    I am having quite similar requirement. My reason for not being able to filter-out items is, the item's children are something i don't want to hide. In other words, i just want to hide parent item whereas still all its child items need to be displayed. (its ok if collapse/expand handler will not be visible)

    Is there any hope for straight implementation or a work-around?

    Please let me know if anything is unclear or i have missed an important piece of information.

    Good day!

    Regards,
    Kinjal.
  9. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 23 Sep 2010 Link to this post

    Hello,

     Currently this cannot be achieved. 

    Greetings,
    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
  10. Kinjal
    Kinjal avatar
    12 posts
    Member since:
    Jan 2007

    Posted 23 Sep 2010 Link to this post

    Hi Vlad,

    Any idea when this will be natively supported?

    Regards,
    Kinjal
  11. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 23 Sep 2010 Link to this post

    Hi Kinjal,

     Currently we do not have plans to support such feature. If more people ask for this we will do our best to find a way to implement it.

    Best wishes,
    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
  12. Kinjal
    Kinjal avatar
    12 posts
    Member since:
    Jan 2007

    Posted 27 Apr 2011 Link to this post

    Hello Telerik,

    Is this already supported in recent releases? If not, is it planned/scheduled?

    Good day.

    Regards,
    Kinjal.
  13. Kinjal
    Kinjal avatar
    12 posts
    Member since:
    Jan 2007

    Posted 04 May 2011 Link to this post

    Hello! Anybody there!?!
Back to Top
DevCraft banner