RadGridView Filter and Sort on different fields

1 Answer 102 Views
GridView
loic
Top achievements
Rank 1
Iron
loic asked on 10 Nov 2021, 02:04 PM

Hello, I'm using a RadGridView and in one of the Column the data is actually 2 fields combined : a date and a name.

Since I'm also using the filtering popup on this column of the grid, I would like the sort to be applied on the date but the filtering to be applied on the name.

Is that possible ?

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 15 Nov 2021, 01:23 PM

Hello Ioic,

To achieve the wanted behavior, you could set the FilterMemberPath and SortMemberPath to the corresponding fields of the property, that is bound to a column. For example, if the property has 2 fields (as specified Name and Date), you could set them to the mentioned properties as follow:

<telerik:GridViewDataColumn DataMemberBinding="{Binding MyComplexProperty}" FilterMemberPath="MyComplexProperty.Name" SortMemberPath="MyComplexProperty.Date"/>

That said, I have attached a sample project, so you could test these properties, and implement them into your application.

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
GridView
Asked by
loic
Top achievements
Rank 1
Iron
Answers by
Stenly
Telerik team
Share this question
or