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

Filter Expression

3 Answers 224 Views
GridView
This is a migrated thread and some comments may be shown as answers.
yarik
Top achievements
Rank 1
yarik asked on 20 Aug 2007, 07:47 AM
hi i set a Filter Expression manualy

DataGrid.MasterGridViewInfo.FilterExpression = "id = 7" ;

but the gird didn't filer the rows .
i tried 

DataGrid.MasterGridViewInfo.UpdateFiltering();

DataGrid.MasterGridViewInfo.UpdateView();

is there a way to ser the row filter menual from code.

 

3 Answers, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 20 Aug 2007, 09:11 AM
Hi Yarik,

The filtering functionality is still under development and is not explicitly available in the current version of RadGridView. At the moment you can use:
 
GridViewDataColumn col = radGridView1.MasterGridViewTemplate.Columns["Id"as GridViewDataColumn; 
 
col.Filter.Function = GridKnownFunction.EqualTo; 
col.Filter.StringValue = "7"


Regards,

Evtim
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Faisal
Top achievements
Rank 1
answered on 18 Nov 2008, 07:44 PM
Hi Evtim,

Could you please provide the above code snippet in C# as well. There does not seem to be a col.Filter.Function property available for GridViewDataColumn in C#.

Thanks,
Faisal
0
Nick
Telerik team
answered on 19 Nov 2008, 08:29 PM
Hello Faisal,

Thank you for you question.

It is not a languag- related issue. Just filter expressions got more advanced:

this.radGridView1.Columns[0].Filter.Predicates[0].Function = ...

Please refer to our documentation and sample application for more information.

 
All the best,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
yarik
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Faisal
Top achievements
Rank 1
Nick
Telerik team
Share this question
or