Sortable: A-Z items

6 posts, 1 answers
  1. Federico
    Federico avatar
    26 posts
    Member since:
    Sep 2017

    Posted 26 Sep Link to this post

    how to print alphabetically items in multiselect?

    <select id="item-a" data-role="multiselect"
    data-value-primitive="true"
    data-text-field="text"
    data-value-field="id"
    data-bind="value: doc,
    source: sourceItem"></select>
  2. Nencho
    Admin
    Nencho avatar
    1643 posts

    Posted 27 Sep Link to this post

    Hello Federico,

    In order to achieve the desired functionality, you can use the sort method of the data Source applied to the multiselect. Please refer to the documentation article below, describing the usage of the sort method:

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

    In addition, I have created a dojo example for you, where this implementation is demonstrated:

    http://dojo.telerik.com/@nenchef/AgerA/2

    Hope this would help.

    Regards,
    Nencho
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Federico
    Federico avatar
    26 posts
    Member since:
    Sep 2017

    Posted 28 Sep Link to this post

    It's possible to do it without angular, with only kendo ui mvvm(html5+databinding+js)?

    I want it to be created datasource already in alphabetical order without function onClick.

  4. Joana
    Admin
    Joana avatar
    125 posts

    Posted 29 Sep Link to this post

    Hi Federico,

    I have updated the dojo sample my colleague Nencho has sent you based on your requirements: http://dojo.telerik.com/upaVe . 

    Let me know if you have further questions.

    Regards,
    Joana
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Federico
    Federico avatar
    26 posts
    Member since:
    Sep 2017

    Posted 02 Oct Link to this post

    How i can do it("datasource.sort") with mvvm?

     

    products.sort({
                field: 'ProductName',
                dir: 'asc'
              });

    Can i do it in the multiselect?

  6. Answer
    Joana
    Admin
    Joana avatar
    125 posts

    Posted 03 Oct Link to this post

    Hi Federico,

    The same approach could be used in MVVM scenario for sorting the MultiSelect dataSource. Here is an updated dojo in MVVM scenario: http://dojo.telerik.com/ogaSAm

    Regards,
    Joana
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top