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

How to clear filter string from server side button command event

2 Answers 18 Views
SearchBox
This is a migrated thread and some comments may be shown as answers.
Robin
Top achievements
Rank 2
Robin asked on 19 Oct 2013, 03:35 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 21 Oct 2013, 04:39 AM
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.
0
Robin
Top achievements
Rank 2
answered on 21 Oct 2013, 05:15 AM
Ah...I didn't thought that clearing SearchBox is as easy as clearing TextBox :P
Thanks a lot.

Robin
Tags
SearchBox
Asked by
Robin
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 1
Robin
Top achievements
Rank 2
Share this question
or