or
<div class="view-content"> <h1>Welcome!</h1> <a id="skin-change" data-role="button" data-click="app.changeSkin">Flat</a> <p> Telerik AppBuilder⢠enables you to build cross-platform device applications regardless of your development platform by combining the convenience of a local development toolset with the power and flexibility of the cloud. </p> <input data-role="switch" data-on-label="" data-off-label=""/> <div class="img"></div> </div>
var dsGalleryItem = new kendo.data.DataSource({ transport: { read: { url: '@Url.Content("~/Intranet/GalleryItem/SearchGalleryItems")', type: "POST", data: $("#fmSearch").serializeFormToJSON(), cache: false } }, schema: { model: { id: "galleryItemID", fields: { galleryItemID: { nullable: true }, imageName: {}, collectionName: {}, categoryName: {}, lastUpdatedOn: { type: "date" } } } } }); var gvResults = $("#gvResults").kendoGrid({ autoBind:false, columns: [{ field: "imageName", title: "Item Name", template: "<a href='@Url.Content("~/Intranet/GalleryItem/Details/")#=galleryItemID#'> #=imageName#</a>" }, { field: "collectionName", title: "Collection" }, { field: "categoryName", title: "Category" }, { field: "lastUpdatedOn", title: "Last Updated", format: "{0:M/d/yyyy}" } ], selectable: "row", change: onRowSelect, dataSource: dsGalleryItem }); $("#fmSearch").submit( function (event) { event.preventDefault(); dsGalleryItem.read({ data: $("#fmSearch").serializeFormToJSON() }); });[HttpPost] public JsonResult SearchGalleryItems(string keyword, int? category, int? collection, DateTime? startDate, DateTime? endDate) { var galleryItemList = (from g in db.GalleryItems //where g.imageName.Contains(keyword) select new GalleryItemViewModel { galleryItemID = g.galleryItemID, imageName = g.imageName, collectionName = g.collection.collectionName, categoryName = g.category.categoryName, lastUpdatedOn = g.lastUpdatedOn }); var galleryItemCount = Json(galleryItemList.ToList()); return Json(galleryItemList.ToList()); ; }var list=[{label:'tag1', value:'1'}, {label:'tag9', value:'9'}, {label:'tag8', value:'8'}, {label:'tag7', value:'7'}, {label:'tag6', value:'6'}, {label:'tag5', value:'5'}, {label:'tag4', value:'4'}, {label:'tag3', value:'3'}, {label:'tag2', value:'2'}];function fillData(tagIds){ var tagObj = $("#addTags").data("kendoMultiSelect"); if (tagObj == undefined) { // if not loaded $("#addTags").kendoMultiSelect({ dataTextField: "label", dataValueField: "value", dataSource: list, value: tagIds, placeholder: "Select from list", change: function() { // change } }); } else { // if already loaded only change the values. tagObj.value(tagIds); console.log(tagIds); console.log(tagObj.value()); }}function fillaList(){ var tagIds=[1,2,3]; fillData(tagIds);}function clearList(){ fillData([]);}