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

[Solved] Multi-column filtering at code-behind

3 Answers 182 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Liji Jose
Top achievements
Rank 1
Liji Jose asked on 16 Feb 2010, 06:47 AM

Hi,

In RadGrid, is it possible to set multi-column filtering, what I mean by multi-column filtering is for the same column can I set a filter expression using logical operators, ie., like FilterExpression = "ID equals OR greater Than 10".(ID being the column)

How can I set the filter expression at code-behind?

Could u plz reply me with the code snippet....

-Liji Gilesh

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Feb 2010, 10:15 AM
Hi,

You can manipulate the RadGrid1.MasterTableView.FilterExpression as  shown below:

  protected void Button1_Click(object sender, EventArgs e) 
        { 
            RadGrid1.MasterTableView.FilterExpression = "[CustomerID] = 'ALFKI' OR [CustomerID] = 'CENTC' "
 
            RadGrid1.Rebind(); 
        } 


Thanks,
Princy




0
Liji Jose
Top achievements
Rank 1
answered on 16 Feb 2010, 12:33 PM


Thanks Princy for the reply....

Further more, can I set the same at runtime, ie., with filter menu can I set the same?

Awaiting ur reply,
Liji Gilesh
0
Princy
Top achievements
Rank 2
answered on 17 Feb 2010, 04:42 AM
Hi Liji,

Please  have a look at the links below on how to localize the filter menu options to add your custom filter and also on how to manually set the Filter Expression for the custom filter.



Thanks,
Princy
Tags
Grid
Asked by
Liji Jose
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Liji Jose
Top achievements
Rank 1
Share this question
or