I have previously asked a question about this but it got a little jumbled so I thought i would start a new thread
I have been able to add custom columns to the gantt chart but only text boxes. I can see from the documentation that I could add a select too.
However I would reallly like to be able to add a checkbox custom column. By this I mean that it would display a checkbox in the lightbox form but on the actual task list it would show the checkbox selected value (e.g. yes for checked or not for not checked as an example)
I know i could achieve this with a select with 2 options but I would much prefer a checkbox.
Hello,
the current version of the component does not include a checkbox control for the lightbox. However, it can be implemented easily.
The code (checkbox definition, grid and lightbox configuration) might look like following:[code]//simple checkbox control
gantt.form_blocks[‘checkbox’]={
render:function(config) {
return “”;
},
set_value:function(node,value,ev,config){
node.checked = !!value;
},
get_value:function(node,ev,config){
return !!node.checked;
},
focus:function(node){
}
};
hello advance… i’ve some problem too with checkbox… i’am adding checkbox on specify column not in lightbox. but, when i’am checked the checkbox form and i’am click other checkbox, the checkbox back to “not checked”…
Hi,
you need to bind the state of a checkbox you render to the state of the task - make it checked/unchecked depending on a certain property of the task object, and change that property of the task when user checks or unchecks the checkbox, there shouldn’t be any issues with that : https://snippet.dhtmlx.com/de16af567
hi, is it possible to add two checkbox in one column with different values (i.e. value=1 and value=2). and when i check the checkbox with value=2 a text box should appear either in a separate column or in the same column.