Read Only controls

Hi,

{name: “type”, type: “typeselect”, map_to: “type”}, I want to make this read only.
i tried readonly:true , disabled:true Not working .

{name:“owner”,height:60, type:“resources”, options:gantt.serverList(“people”), map_to:“owner_id”, default_value:8},

this “unit” Alone should be readonly mode.

{name: “time”, type: “duration”, map_to: “auto”} In this time control "duration " alone want read only

Is this possible ?

Hi @Jananicn,
If I understand you correctly, you want to disable some controls in the lightbox, am I right?
If it is so, you easily can do it using the onLightbox event. All that you need is to get access to the lightbox section you want to change:
var userSection = gantt.getLightboxSection('users'),
where users is the name of the section. Get access to the HTML element you want to disable:
var userSelectors = userSection.node.querySelectorAll("select").
After that, you will be able to add the disabled attribute to each select element in this section:

      userSelectors.forEach(el => {
          el.setAttribute("disabled", "disabled");
      }); 

The same scenario will work with another lightbox sections/controls.
Here is a demo(the tasks with names “Non editable #”, have disabled controls : user/duration ):
http://snippet.dhtmlx.com/cde475a72

If I misunderstand you, could you please clarify your question?

API:
onLightbox:
https://docs.dhtmlx.com/gantt/api__gantt_onlightbox_event.html
getLightboxSection:
https://docs.dhtmlx.com/gantt/api__gantt_getlightboxsection.html

Thanks… I fixed this .