I used the MVC example which works perfect as-is I rewrote to work with a JSON request and it ALSO works fine, however when I try to view the data in a string it is trying to display the OBJECT and not the data inside the object. I ASSUMED that the SelectedData is also in JSON format becuase the MultiSelect datasourse is a JSON object.
@(Html.Kendo().MultiSelect()
.Name("GridSelect")
.AutoClose(false)
.Placeholder("Select Which Grids to Print...")
.DataTextField("MapName")
.DataValueField("Pagenumber")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetCascadeGrid100", "GridPrint")
.Data("filterGrid100");
})
.ServerFiltering(true);
})
)
So my issue is when I create click button function and I want to display the selected items.. here is what I have tried and the results. I just want to display my data in a string Mapname:1 PageNumber:234, Mapname:3, PageNumber:3244 etc...
$(document).ready(function () {
var Gridselect = $("#GridSelect").data("kendoMultiSelect");
$("#get").click(function () {
alert( Gridselect.value + ", " + Gridselect.text + ",");
// this displays nothing but the commas
// Also have tried
var output = '';
for (var entry in Gridselect) {
output += 'key: ' + entry + ' | value: ' + Gridselect[entry] + '\n';
}
alert(output);
// This displays a bunch of data but none of my values, it seems to parse the PageNumber and the MapName so there is something in there.
// Also Tried
alert(Gridselect.toSource);
});
});