Hi,
Is there any way to change the select to multi select?
Hi,
Is there any way to change the select to multi select?
Hi,
a multiselect control is currently not implemented for gantt.
You can try porting it from dhtmlxScheduler, their lightboxes has similar APIs
github.com/DHTMLX/scheduler/blo … iselect.js
docs.dhtmlx.com/gantt/desktop__c … ditor.html
I’ve adapted one from the link. It uses jquery for convenience
gantt.form_blocks[“multiselect”] = {
render:function(sns){ //sns - the section’s configuration object
var result = “
// make sure there is a value
if (value && value != '') {
// reset the selections
$("option:selected", node).removeAttr("selected");
// parse the info. assme json string like '[1,2,3]'
value = JSON.parse(value);
if ($.isArray(value)) {
$.each(value, function (i, val) {
$("option[value='" + val + "']", node).prop("selected", true);
});
}
}
},
get_value:function(node,task,section){
//node - an html object related to the html defined above
//task - the task object
//section - the section's configuration object
//return "current value from editor";
var values = [];
$(':selected', node).each(function (i, selected) {
values[i] = $(selected).val();
});
return values;
},
focus:function(node){
}
}