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

DataGridTemplateColumn Filter

3 Answers 237 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Daniel Vaughan
Top achievements
Rank 1
Daniel Vaughan asked on 09 Sep 2018, 04:55 PM

I have defined a DataGridTemplateColumn shown below. How do I enable filtering in the user interface? The filtering control is not shown for DataGridTemplateColumns. I would have expected that I could define a FilterDescriptor, as I did for sorting and grouping, but no such property exists.

 

<grid:DataGridTemplateColumn Header="Device Serial"  
           CanUserEdit="False" CanUserFilter="True" CanUserSort="True"
   <grid:DataGridTemplateColumn.SortDescriptor
          <core:PropertySortDescriptor PropertyName="DeviceSerialNumber" /> 
   </grid:DataGridTemplateColumn.SortDescriptor
   <grid:DataGridTemplateColumn.GroupDescriptor
          <core:PropertyGroupDescriptor PropertyName="DeviceSerialNumber" /> 
   </grid:DataGridTemplateColumn.GroupDescriptor><grid:DataGridTemplateColumn.CellContentTemplate
        <DataTemplate
           <HyperlinkButton Content="{Binding DeviceSerialNumber}" Tapped="HandleSerialTapped" /> 
        </DataTemplate
   </grid:DataGridTemplateColumn.CellContentTemplate
 </grid:DataGridTemplateColumn

3 Answers, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 11 Sep 2018, 01:14 PM
Hi Daniel,

Thank you for the provided code.

The filtering functionality is not provided out of the box with the current implementation of the DataGridTemplateColumn. The FilterDescriptor could be used in order to filter the Grid. It should be set to the DataGrid itself not to the column. Please check the following article for more detailed information: DataGrid: Delegate Filter Descriptor

In order to enable filtering on the TemplateColumn in the user interface you can create a filtering control of your own. Please take a look at the following article from our help documentation how to achieve this: DataGrid: How to create custom filtering control. I have also attached a sample project that demonstrates how the custom filtering control could be visualized for the DataGirdTemplateColumn.

I hope this will help. 

Regards,
Didi
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Daniel Vaughan
Top achievements
Rank 1
answered on 11 Sep 2018, 01:49 PM

Thanks for your response. 

It doesn't really help though because I was able to deduce that a custom filtering control was possible.

It's a shame you don't provide this feature out of the box. To me it seems like a bit of an oversight, since you already support sorting that way.

Regards,

Daniel

0
Didi
Telerik team
answered on 14 Sep 2018, 07:41 AM
Hi Daniel,

We have a Feedback Portal for UI for UWP and it could be used for logging issues or feature requests. Currently the RadDataGrid.TemplateColumn doesn't provide filtering functionality out of the box. In this case you could make a request for this feature to be included in the DataGrid for UWP features set.

Let me know if you have any other questions regarding this.

Regards,
Didi
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
DataGrid
Asked by
Daniel Vaughan
Top achievements
Rank 1
Answers by
Didi
Telerik team
Daniel Vaughan
Top achievements
Rank 1
Share this question
or