Filterable with data source from angularjs

3 posts, 0 answers
  1. Bertha
    Bertha avatar
    78 posts
    Member since:
    Aug 2012

    Posted 04 Jan Link to this post

    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. Dimitar
    Admin
    Dimitar avatar
    454 posts

    Posted 08 Jan Link to this post

    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.
  3. Bertha
    Bertha avatar
    78 posts
    Member since:
    Aug 2012

    Posted 08 Jan Link to this post

    Fantastic!  Very easy to use.
Back to Top