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

Filterable with data source from angularjs

2 Answers 790 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Bertha
Top achievements
Rank 1
Bertha asked on 04 Jan 2018, 04:32 PM

I want kendo drop down list to be filterable by user typing but the data source is from my angularjs.  I could only find example with server filtering.  I tried to add filterable="true" but not sure what else need to add.  Thanks.

<select id="fac" kendo-drop-down-list style="width: 260px" filterable="true"
k-option-label="' Choose Region or Home '"
k-data-text-field="'FacilityName'"
k-data-value-field="'FacCode'"
k-data-source="facilityList"
k-on-change="facilityChange(kendoEvent)"
data-ng-model="selectedfacility"></select>

2 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 08 Jan 2018, 12:37 PM
Hello Bertha,

By default the Kendo UI DataSource filters data on the client. For the DropDownList widget, filtration is turned off by default - to enable it, simply specify the filtering method ("startswith", "contains" or "endswith") in the DropDownList filter option:
<select kendo-drop-down-list
  k-data-text-field="'ProductName'"
  k-data-value-field="'ProductID'"
  k-data-source="productsDataSource"             
  k-option-label="' Choose a Product... '"
  k-filter="'contains'"
  style="width: 100%">             
</select>

Checkout the following Dojo example, where the above is demonstrated in action. 

In case you would like to perform filtering on the serverSide, the DataSource's serverFiltering option has to be set to true. This will force filtering to be performed on the server side.

Regards,
Dimitar
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.
0
Bertha
Top achievements
Rank 1
answered on 08 Jan 2018, 02:11 PM
Fantastic!  Very easy to use.
Tags
DropDownList
Asked by
Bertha
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Bertha
Top achievements
Rank 1
Share this question
or