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

filter: "wordStartsWith"

3 Answers 20 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Shea
Top achievements
Rank 1
Shea asked on 23 Nov 2013, 10:29 PM
I need to have my combo box filter on items that have a word that starts with the text typed.
So typing 'and':

thousand - no
And Cats - yes
Andales - yes
sandman - no

Using contains would show all of those. Is it possible to have a custom filter that would just show And Cats, and Andales?

~S

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 25 Nov 2013, 02:44 PM
Hi Shea,


To achieve this you should use the filter configuration option of the ComboBox and set it to startswith.

I wish you a great day!

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Shea
Top achievements
Rank 1
answered on 25 Nov 2013, 02:54 PM
Dimiter,

Thanks for the reply. I make a mistake explaining my question.

I want the filter to be aware of 'words', so that 'and' matches 'one and two'. Using startsWith, 'one and two' would not match 'and' would it? In my tests it does not.
0
Accepted
Dimiter Madjarov
Telerik team
answered on 25 Nov 2013, 03:29 PM
Hi Shea,


There is no such built in filter. Nevertheless in the current scenario you could set any type of filter, for example "contains" (because the filtering is disabled by default) and enable the serverFiltering option of the dataSource. In this case the developer is responsible to manually perform the filtering on the back end and return the matched items to the widget.

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ComboBox
Asked by
Shea
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Shea
Top achievements
Rank 1
Share this question
or