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

[Solved] Limit the result row count in Autocomplete Dropbdown

1 Answer 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Aram
Top achievements
Rank 1
Aram asked on 08 Apr 2013, 08:44 PM

Hi Guys
I am using the Html.Telerik().AutoComplete() in an asp.net mvc 4 project..
I wanted to know how can i limit the number of rows being displayed in the Autocomplete result set.

the way I am using this, I am using server side binding. passing a complete viewbag with all rows to the view and use the BindTo method on the autocomplete:
@(Html.Telerik().AutoComplete()
    .Name("searchText")
    .Value(Model.FilterText)
    .BindTo(Model.ProductEditions.Select(p => p.ProductFamilyName))
    .HtmlAttributes(new { Class = "filterText" })
    .DropDownHtmlAttributes(new { size = "2" })
    .Filterable(filtering =>
                {
                    filtering.FilterMode(AutoCompleteFilterMode.Contains);
                    filtering.MinimumChars(Model.MinCharsToShowAutocomplete);
                }
             )
 )

Thanks

1 Answer, 1 is accepted

Sort by
0
Aram
Top achievements
Rank 1
answered on 09 Apr 2013, 04:06 PM
Any Ideas about this guys?
Tags
General Discussions
Asked by
Aram
Top achievements
Rank 1
Answers by
Aram
Top achievements
Rank 1
Share this question
or