when i use this code as script i get this error in console :
Syntax Error: missing variable name
$(document).ready(function () {
var multiselect = $("#TahiyeKonande").data("kendoMultiSelect");
var arr = [];
var t = @ttt;
var tt = t.split(",");
console.log(tt);
// set the value of the multiselect.
console.log(arr);
multiselect.value(arr);
});
for convert razor viewbag string to js use double quotation
$(document).ready(function () {
var multiselect = $("#TahiyeKonande").data("kendoMultiSelect");
var arr = [];
var t = "@ttt";
var tt = t.split(",");
console.log(tt);
// set the value of the multiselect.
console.log(arr);
multiselect.value(arr);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With