How to clear filter string from server side button command event

3 posts, 1 answers
  1. Robin
    Robin avatar
    41 posts
    Member since:
    Sep 2012

    Posted 19 Oct 2013 Link to this post

    Hello, 

    Is there a way to clear filter string after user clicked on search button.
    Before Q3, If I am not mistaken, filter string was cleard automatically after serach.


    protected void rsbProducts_ButtonCommand(object sender, SearchBoxButtonEventArgs e)
    {
        if (e.CommandName == "clearfilter")
        {
            // Required to clear current filter text
        }
    }

    Thanks in advanced, 
    Robin
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 20 Oct 2013 Link to this post

    Hi Robin,

    The search text is not automatically cleared after search in RadControls versions prior to Q3 2013. You can try the following C# code to clear the search text from server side.

    C#:
    RadSearchBox1.Text = "";

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Robin
    Robin avatar
    41 posts
    Member since:
    Sep 2012

    Posted 21 Oct 2013 Link to this post

    Ah...I didn't thought that clearing SearchBox is as easy as clearing TextBox :P
    Thanks a lot.

    Robin
Back to Top