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

sorting filter items

5 Answers 78 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
JIG
Top achievements
Rank 1
JIG asked on 28 May 2018, 11:42 AM

Is it possible to change the order of the items used in the filter?

 

Now they are being set by the order of the columns of the gridviewcolumns

5 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 31 May 2018, 08:47 AM
Hi Marnix,

Can you please clarify whether you are using RadGridView, or RadDataFilter? What are the items that you are trying to sort? In case you refer to RadGridView, you can manipulate its DistinctValues collection. This topic is discussed in greater detail here.

Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
JIG
Top achievements
Rank 1
answered on 06 Jun 2018, 12:27 PM
it's a raddatafilter linked to a radgridview source, in the datafilter we get the columns of the radgridview available for selection but those items i would like to be able to sort
0
JIG
Top achievements
Rank 1
answered on 06 Jun 2018, 12:29 PM
i included an example, i would like to be able to sort the items alphabeticly for example and not in the order of the columns
0
JIG
Top achievements
Rank 1
answered on 06 Jun 2018, 12:30 PM
i included an example in which you can see that the raddatafilter items are sorted in the same order as the gridcolumns but i would like to sort the items differently
0
Stefan
Telerik team
answered on 11 Jun 2018, 10:53 AM
Hi Marnix,

Thank you very much for the provided image.

The logic for generating the filter operators of RadDataFilter is internal for the control. What might be a possible solution would be to edit the template of the control. There is a RadComboBox instace with Name="PART_SimpleFilterMemberComboBox" defined within it. You can try applying an IValueConverter to its ItemsSource binding to achieve your goal. Can you please check this out?

Let me know in case I can be of further help.

Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
DataFilter
Asked by
JIG
Top achievements
Rank 1
Answers by
Stefan
Telerik team
JIG
Top achievements
Rank 1
Share this question
or