Kendo Combobox Angular Directive - how to set sort order?

2 posts, 0 answers
  1. Saquib
    Saquib avatar
    3 posts
    Member since:
    Aug 2015

    Posted 17 Dec 2015 Link to this post

    Hi

     Using the kendo-combo-box as show below, how can I specify a sort order for the generated select box ?

     Thanks!

    <select id="Team_Select" class="form-control" kendo-combo-box
        k-placeholder="'Select team'"
        k-data-text-field="'Description'"
        k-data-value-field="'ObjectNumber'"
        k-filter="'contains'"
        k-auto-bind="false"
        k-min-length="3"
        k-data-source="Persons"
        ng-model="Filters.Team_Select">
    </select>

  2. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 18 Dec 2015 Link to this post

    Hi,

    You may try to sort the datasource:

    {
        data:[
            { setorNome: "bbb", setorId: 1 },
            { setorNome: "aaa", setorId: 2 },
            { setorNome: "eee", setorId: 3 },
            { setorNome: "ccc", setorId: 4 },
            { setorNome: "ddd", setorId: 5 }],
        sort:{field:"setorNome", dir:"asc"}
    }

    http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-sort

    Regards,
    Helen
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top