This question is locked. New answers and comments are not allowed.
I am new to kendo and I recently started coding in C#.net MVC. I have a JSON array in jsonObj(variable name), like for example:
'[{"key":"Name","comparison":"Equals","values":["JOHN","LILY"]}]' which is coming from database(controller) as a string...So, I used
var jsonObj = $.parseJSON(dataItem.Data);
So, I got back the previous array string... where values contain the kendo multiSelect values....
Now I want this `jsonObj.values` to be set into the kendo multiSelect on a button click. I can see the values in alert as JOHN,LILY for alert(jsonObj.values);.
I coded:
$("#DrugNames").data("kendoMultiSelect").value(jsonObj.values);
$("#DrugNames").data("kendoMultiSelect").value(jsonObj.values.toString().split(','));
But nothing seems to work... I also tried using:
$("#DrugNames").data("kendoMultiSelect").value(["ABC","ASH"]);
Still no success. Please let me know where am I wrong.. Thanks in advance...
'[{"key":"Name","comparison":"Equals","values":["JOHN","LILY"]}]' which is coming from database(controller) as a string...So, I used
var jsonObj = $.parseJSON(dataItem.Data);
So, I got back the previous array string... where values contain the kendo multiSelect values....
Now I want this `jsonObj.values` to be set into the kendo multiSelect on a button click. I can see the values in alert as JOHN,LILY for alert(jsonObj.values);.
I coded:
$("#DrugNames").data("kendoMultiSelect").value(jsonObj.values);
$("#DrugNames").data("kendoMultiSelect").value(jsonObj.values.toString().split(','));
But nothing seems to work... I also tried using:
$("#DrugNames").data("kendoMultiSelect").value(["ABC","ASH"]);
Still no success. Please let me know where am I wrong.. Thanks in advance...