This is a migrated thread and some comments may be shown as answers.
Question about value MultiSelect function ?
5 Answers 29 Views
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 03 Jun 2014, 10:00 AM
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

5 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 03 Jun 2014, 10:44 AM
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!
 
0
Kevin
Top achievements
Rank 1
answered on 03 Jun 2014, 11:09 AM
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
0
Kiril Nikolov
Telerik team
answered on 04 Jun 2014, 08:06 AM
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!
 
0
Kevin
Top achievements
Rank 1
answered on 05 Jun 2014, 12:37 PM
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
0
Kiril Nikolov
Telerik team
answered on 06 Jun 2014, 10:43 AM
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!
 
Asked by
Kevin
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or