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

RadFilter Get Expressions

1 Answer 97 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kiran
Top achievements
Rank 1
Kiran asked on 18 Jun 2013, 02:32 PM
Dear All,

How can I get radfilter selected expression as a string so that I can filter datasource and rebind the grid.

Thank you

Best Regards,

Kiran

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 19 Jun 2013, 06:34 AM
Hi,

Try the following code snippet  to get the expression.
C#:
protected void RadFilter1_ApplyExpressions(object sender, Telerik.Web.UI.RadFilterApplyExpressionsEventArgs e)
{
    RadFilterSqlQueryProvider provider = new RadFilterSqlQueryProvider();
    provider.ProcessGroup(e.ExpressionRoot);
    String exp = provider.Result; // to ge the expression in string exp.
 
  /*the following code is to get the expression with out '[' and ']'*/
    int i= exp.IndexOf('[');
    exp = exp.Remove(i, 1);
    int j=exp.IndexOf(']');
    exp =exp.Remove(j, 1);
}

Thanks,
Shinu.
Tags
General Discussions
Asked by
Kiran
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or