Question about value MultiSelect function ?

6 posts, 0 answers
  1. Kevin
    Kevin avatar
    6 posts
    Member since:
    May 2014

    Posted 03 Jun 2014 Link to this post

    I need to implement a kendo multiselect value with a json object

    But,i don't know how to get a json object ? And if is it possible to store it in a variable ?


    I need your help,



    Best regards,


    Kevin Quinton
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 03 Jun 2014 Link to this post

    Hello Kevin,

    I am not really sure that I understand your question. Could you please elaborate a bit more?\

    Thanks in advance.

    Regards,
    Kiril Nikolov
    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
  4. Kevin
    Kevin avatar
    6 posts
    Member since:
    May 2014

    Posted 03 Jun 2014 in reply to Kiril Nikolov Link to this post

    I want initialize a multiselect widget using method value to show the
    selected items. This selected items are not selected from the list
    linked but by another widget.

    This widget may return a new json data. This data will provide the
    multiselect value.


    It's an example of my code :

    var json = // I would like to store the json data which it returns


        //selection automatique des dates
        var listeDateAfficher = $.map(json, function (dataItem) {
            return dataItem.value;
        });

        testMultiselectWithData.value(listeDateAfficher);

    I hope this example you will permit to have a better understanding of my problem.

    Best regards,

    Kevin Quinton
  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 04 Jun 2014 Link to this post

    Hi Kevin,

    You can use the value() method of the MultiSelect widget in order to set its value. It accepts array of string as values and it is explained here:

    http://docs.telerik.com/kendo-ui/api/web/multiselect#methods-value

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Kevin
    Kevin avatar
    6 posts
    Member since:
    May 2014

    Posted 05 Jun 2014 in reply to Kiril Nikolov Link to this post

    First of all thank you for your answer.

    But sorry I have another question, which have not relation with Kendo. Is it possible to store in a variable the return json ?

    Best regards,

    Kevin Quinton
  7. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 06 Jun 2014 Link to this post

    Hi Kevin,

    JSON objects can be stored in a local variable and should not be an issue in your project. 

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