This is the code of my multiselect dropdown column. It is working as I expected but I want some modification on edit mode.
{
name: 'SubjectId',
index: 'SubjectId',
align: 'center',
hidden: true,
viewable: true,
editrules: { edithidden: true },
editable: true,
formatter: 'select',
editable: true,
edittype: 'select',
editoptions: {
multiselect: true,
dataUrl: '@Url.Action("getAllSubjects", "Subject")',
//buildSelect: function (data) {
//var retValue = $.parseJSON(data);
buildSelect: function (data) {
var response, s = '<select>', i;
response = jQuery.parseJSON(data);
// s += '<option value="0">--Select Subject--</option>';
if (response && response.length) {
$.each(response, function (i) {
s += '<option value="' + this.Id + '">' + this.SubjectName + '</option>';
});
}
return s + '</select>';
},
dataInit: function (elem) {
setTimeout(function () {
$('#SubjectId').multiselect();
}, 5);
},
multiple: true,
}
},
But on edit mode I want to make multiselect false.How can do it.I don't understand how to do it.