How to show Filter expression on page load by default?

2 posts, 0 answers
  1. Varma
    Varma avatar
    1 posts
    Member since:
    Sep 2010

    Posted 30 Jun 2011 Link to this post

    Hi,

    I want to show filter expression show by default on page load.

    Title Contains 'IPhone'

    How to show this automatically without click Add button?

    Regards
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 01 Jul 2011 Link to this post

    Hello Varma,

    Try the following code snippet in page load to show default filter expression.

    C#:
    protected void Page_Load(object sender, EventArgs e)
    {
           if (!IsPostBack)
            {
                RadFilterContainsFilterExpression expr1 = new RadFilterContainsFilterExpression("Title");
                expr1.Value = "IPhone";
                RadFilter1.RootGroup.AddExpression(expr1);
            }
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top