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

How to filter on the grid by just using a string

1 Answer 41 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Transics
Top achievements
Rank 1
Transics asked on 11 Jan 2012, 05:50 PM
Hi,

I would like to know if there is a possibililty to just filter on the RadGridView by passing a string to a certain property.

I've seen that there is FilterExpressionChanged Event which has the FilterExpressionChangedEventArgs as argument and that argument has a property FilterExpression.

What I would like to have is to be able to just call this property FilterExpression so I know in a string the filter expression on the entire grid and can also pass a string to this Expression to be able to filter.

Is this possible? Or maybe a workaround?

1 Answer, 1 is accepted

Sort by
0
Accepted
Julian Benkov
Telerik team
answered on 13 Jan 2012, 02:19 PM
Hello,

You can achieve this functionality by using the Expression property of the FilterDescriptors collection of RadGridView:

this.radGridView1.FilterDescriptors.Expression = "(([ProductName] LIKE '%Qu%'))";

If you have other questions, do not hesitate to contact me again.

Kind regards,
Julian Benkov
the Telerik team

SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

Tags
GridView
Asked by
Transics
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or