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

Display all children values in filter panel

4 Answers 103 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Valentin
Top achievements
Rank 1
Iron
Valentin asked on 19 Jun 2019, 12:19 PM

Hi Telerik,

I'm using a RadTreeListView with allowed filters.

> 'MyTreeListView.png' showing you my expanded tree.

 

When I click on the filter buttons, the panel is displayed, but in the values area, there are only the values of the "parent" rows (like in the 'Filter1' & 'Filter2' attached files).

 

I want to know if is it possible to display all existing values in the column ?

For example, in 'Filter2' screen, there will be :

[ ] nul

[ ] Task 1.1 A

[ ] Task 1 A

[ ] Task 1 B

[ ] Task 2 A

 

Thank you !

Valentin.

4 Answers, 1 is accepted

Sort by
0
Dinko
Telerik team
answered on 24 Jun 2019, 08:27 AM
Hello Valentin,

Thank you for the provided images.

By default, RadTreeListView will populate only the top level items, as loading the sub items would require expanding them as well. As this would be a time consuming operation the control filter popup loads only the top items. What you can try is to assign a custom collection in the DistinctValuesLoading event, as suggested in the How can I filter on all the hierarchy but not only top level forum thread, for example. I have also increased the priority of the logged feature request in our system: Add a way to display all distinct values for sub levels. 

Regards,
Dinko
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.
0
Valentin
Top achievements
Rank 1
Iron
answered on 02 Aug 2019, 08:08 AM

Hi Dinko,

 

Thank you for your answer.

 

I tried to implement this event like is done in your links but the DistinctValuesLoading event is not fired.

My RadTreeListView :

<telerik:RadTreeListView AutoGenerateColumns="False" ItemsSource="{Binding SelectionDetails}" CanUserResizeRows="True" CanUserDeleteRows="False" CanUserReorderColumns="True"
                                 ReorderColumnsMode="ReorderColumns" VerticalAlignment="Stretch" ColumnWidth="Auto" GroupRenderMode="Flat" GridLinesVisibility="Both"
                                 SelectionMode="Multiple" SelectionUnit="FullRow" FontSize="{StaticResource FontSizeText}" IsReadOnly="{Binding IsReadOnlyMode}" x:Name="rtlvDetails"
                                 AutoExpandItems="True" ValidatesOnDataErrors="InViewMode" ValidationType="None"
                                 SelectionChanged="rtlvDetails_SelectionChanged" EditTriggers="Default" ClipboardPasteMode="AllSelectedCells"
                                 CanUserSelect="False" FrozenColumnCount="3" CellValidating="rtlvDetails_CellValidating" Grid.Row="1" CanUserFreezeColumns="False" IsSynchronizedWithCurrentItem="False"
                                 CellValidated="rtlvDetails_CellValidated">

 

Be sure that when I tried it, the event has been declared in xaml.

 

I have another question : Are you sure the linked example will work for hierarchical RadTreeListView (=> to find all children values).

 

Thank you.

0
Accepted
Dinko
Telerik team
answered on 06 Aug 2019, 12:37 PM
Hi Valentin,

I have double-checked the approach with subscribing to the DistinctValuesLoading event. I can confirm that this event is called when the filter icon is clicked. For your convenience, I have prepared a sample project which demonstrates how you can manually populate the filter popup distinct values with custom ones. In the project, I am recursively getting all unique values.

I hope this project will be in handy for your scenario.

Regards,
Dinko
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.
0
Valentin
Top achievements
Rank 1
Iron
answered on 19 Aug 2019, 08:49 AM

Hi Dinko,

 

Thank you for the provided sample project. I thought this event has been fired on the view loading but it's when the filter is opening.

I can confirm that I can load all distinct values for the main filter panel.

 

Thank you very much.

Tags
TreeListView
Asked by
Valentin
Top achievements
Rank 1
Iron
Answers by
Dinko
Telerik team
Valentin
Top achievements
Rank 1
Iron
Share this question
or