Add array of items into kendo ui multi select

Add array of items into kendo ui multi select

//This is used to add the data source items.
$('#mlConsEmails').data("kendoMultiSelect").dataSource.add({ UserId: "EMP100XYZ",     EmailId: "[email protected]" });

    OR

var multi = $('#mlConsEmails').data('kendoMultiSelect');

//This is used for get the old values from multi select kendo
var values = multi.value().slice(); 

//This is used for merge values in values object.
$.merge(values, "[email protected]");
multi.value(values);

//This is used to refresh multi select kendo 
multi.refresh();
ANIL SINGH

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.
ASK Questions
SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book