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

RadSearchBox searchText length on DataSourceSelect is not correct

1 Answer 91 Views
SearchBox
This is a migrated thread and some comments may be shown as answers.
Iago
Top achievements
Rank 1
Iago asked on 16 Oct 2017, 03:41 PM

Hello,

I am using a RadSearchBox with   MinFilterLength="3". I am interested in filtering my search in OnDataSourceSelect, but even when I type 4 characters, this method: 
   protected void RadSearchBox1_DataSourceSelect(object sender, Telerik.Web.UI.SearchBoxDataSourceSelectEventArgs e)
        {
            string searchText = e.FilterString;
           
        }
e.FilterString.Length returns 3 and RadSearchBox1.Text.Length is also 3 inside the method RadSearchBox1_DataSourceSelect

This is not narrowing enough my result set and I do not want to set MinFilterLength="4" because I have to allow also searchs by 3 characters.
Any suggestion will be welcome. Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 19 Oct 2017, 01:04 PM
Hello Iago,

Please find attached a sample project implementing the approach from the OnDataSourceSelect event article, which shows the correct filter string as demonstrated in this screencast.

If that does not help to resolve the issue, please modify the attached project so that it replicates it and send it back to us in an official support ticket. This would allow us to investigate locally and help you more efficiently.

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
SearchBox
Asked by
Iago
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or