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

[Solved] How to Programmally filtering?

1 Answer 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 11 Jun 2009, 08:42 PM
Hi All,

How to filter programmally using gridfilterexpression (funtion) etc. ? I can not find example.

thanks

Jerry

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Jun 2009, 05:35 AM
Hi Jerry,

I tried following code for filtering grid programatically. Give a try with this.

CS:
 
protected void Button1_Click(object sender, EventArgs e) 
    string value = "a"
    string colName = "FirstName"
    string filterExpression = "(it[\"" + colName + "\"].ToString().Contains(\""+ value +"\"))"
    RadGrid1.MasterTableView.FilterExpression = filterExpression; 
    RadGrid1.MasterTableView.Rebind(); 

Also checkout the following demo:
Grid / Web Mail Grid

Thanks,
Shinu.
Tags
Grid
Asked by
Jerry
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or