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

Hiding TreeListView items

11 Answers 133 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Juan
Top achievements
Rank 1
Juan asked on 08 Jul 2010, 12:43 PM
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

11 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Jul 2010, 12:47 PM
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
0
Juan
Top achievements
Rank 1
answered on 08 Jul 2010, 01:17 PM
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.
0
Vlad
Telerik team
answered on 08 Jul 2010, 01:22 PM
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
0
Juan
Top achievements
Rank 1
answered on 08 Jul 2010, 02:05 PM
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>
0
Valentin.Stoychev
Telerik team
answered on 08 Jul 2010, 02:48 PM
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
0
Kinjal
Top achievements
Rank 1
answered on 20 Sep 2010, 01:14 PM
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.
0
Vlad
Telerik team
answered on 23 Sep 2010, 02:12 PM
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
0
Kinjal
Top achievements
Rank 1
answered on 23 Sep 2010, 02:18 PM
Hi Vlad,

Any idea when this will be natively supported?

Regards,
Kinjal
0
Vlad
Telerik team
answered on 23 Sep 2010, 02:20 PM
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
0
Kinjal
Top achievements
Rank 1
answered on 27 Apr 2011, 07:48 AM
Hello Telerik,

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

Good day.

Regards,
Kinjal.
0
Kinjal
Top achievements
Rank 1
answered on 04 May 2011, 12:35 PM
Hello! Anybody there!?!
Tags
TreeListView
Asked by
Juan
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Juan
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Kinjal
Top achievements
Rank 1
Share this question
or