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

Filtering without column

2 Answers 58 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rayne
Top achievements
Rank 1
Rayne asked on 28 Oct 2015, 04:00 PM

I've just updated the Telerik controls and now I am trying to find a new way to apply my filtering.

 Previously I had a FilterDescriptor defined in the XAML for my grid, that allowed me to filter on a Data Member without including that member as a column. The grid is bound to a child collection of a parent object (which is the data context for the User control). But I need to filter the child collection so that items marked IsDeleted are never shown to the user.

 What is the easiest, quickest way to do this now that FilterDescriptors are no more?

2 Answers, 1 is accepted

Sort by
0
Rayne
Top achievements
Rank 1
answered on 28 Oct 2015, 06:37 PM
I managed to do it quickly in code behind, but I had to add a column for that field and set visibility to false on the column. I would have preferred to do it in xaml and minimize the amount of code-behind since this is an MVVM application.
0
Stefan
Telerik team
answered on 02 Nov 2015, 10:48 AM
Hi Rayne,

For achieving this, you can define a FilterDescriptor as per your requirements and then add it to the FilterDescriptors collection of RadGridView. You can take a look at the example below.
FilterDescriptor descriptor =
    new FilterDescriptor("Name",
        FilterOperator.IsNotEqualTo, "Liverpool");
 
this.clubsGrid.FilterDescriptors.Add(descriptor);

Additionally, you can take a look at our documentation on Filtering.

Hope this helps.

Regards,
Stefan X1
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
GridView
Asked by
Rayne
Top achievements
Rank 1
Answers by
Rayne
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or