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

RadGridView GridViewDataColumn DataFilter Number ContainedIn filtering

1 Answer 36 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ravin
Top achievements
Rank 1
Ravin asked on 06 Jul 2016, 06:36 PM

Good afternoon,

 

I am trying to filter a column that is an Int32 type, and I want to supply a list of numbers to filter it similar to:

Collection<Int32>.Contains(Int32)

 

Ideally, I would like it being applied to the server side of a Linq query (using the QueryableDataServiceCollectionView<T>) class.

 

I see by default, the Is Contained In filter is not enabled or available for non-String types, but is there a way I can override of create a custom behavior to add this IFilterDescriptor (or maybe the IColumnFilterDescriptor contract is what I need to be looking for) to the list that shows up in the CompositeFilterDescriptor to be selected during run time?

 

I found the following post on our company blog: http://www.telerik.com/blogs/filtering-collection-properties-with-radgridview-for-silverlight-and-wpf, which illustrates the example of:

this.players.Where(player => player.FormerClubs.Contains(”Liverpool”));

 

What I need is something like:

(new List<Int32>() { 13, 45, 20 }).Contains(this.tableDto.PrimaryKeyCol);

 

In the instance of the value input into the box being "13,45,20".

Any idea on how I can go about setting this up?

 

Thanks,
Ravin

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 11 Jul 2016, 02:42 PM
Hello Ravin,

Thanks for the detailed explanation of the requirement.

We will research the possibility for it to be achieved. Meanwhile, can you please share some details on whether you have tried updating the implementation demonstrated in the blog post, so that it suits such need?

Best Regards,
Stefan X1
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
GridView
Asked by
Ravin
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or