Create after Create, width 1 column in grid, create new lightbox

1.Creating task from dataProcessor

var dp = gantt.createDataProcessor(function (entity, action, data, id) {
switch (action) {
case “create”:
return gantt.ajax.post({
url: “/api/” + entity,
headers: {
‘Authorization’: 'Bearer ’ + token,
‘Content-Type’: ‘application/json’
},
data: JSON.stringify(data)
});
break;

case “update”:
return gantt.ajax.put({
url: “/api/”+entity+"/" + id,
headers: {
‘Authorization’: 'Bearer ’ + token,
‘Content-Type’: ‘application/json’
},
data: JSON.stringify(data)
});
break;

case “delete”:
return gantt.ajax.del({
url: “/api/”+entity+"/"+ id,
headers: {
‘Authorization’: 'Bearer ’ + token,
‘Content-Type’: ‘application/json’
},
data: JSON.stringify(data)
});
// .then(function (response) {
// console.log(response)
// })
break;
}
});

First task created ok, but when without refreshing i tried second new task in first task, it gaves me error

https://gyazo.com/33d017dbc1ef049bd3c93084f1cc2c97

So, i can create second task in first after refresh the page, how it can be solved ?

2.In column Task name, can i do more width, if it needed like on screenshot automaticly, on the screen i have those setup, yes i can be fix if i will add width 200 or somth, but what if user gonna have 10 sublvl or smth

gantt.config.columns = [
{name: “text”, tree: true, width: ‘*’, resize: true},
{name: “start_date”, align: “center”, resize: true},
{name: “duration”, align: “center”},
{name:“priority”, label:“Priority”, template:function(obj){
return gantt.getLabel(“priority”, obj.priority);
}, align: “center”, width:60 },
{
name: “buttons”,
label: colHeader,
width: 75,
template: colContent
}
];

  1. In buttons add/edit i have custom lightbox, if user will click on new button “share”, can i rewrite lightbox like on screen? ( write multiple
    (https://gyazo.com/62fef52ddce61e745b2676736b7b6da0) select , and select, send and cancel)
    https://gyazo.com/5e71e0cf55f9c88ad1126b722145a1a8

Can someone plz help with some example, so i can put my html

Using cases

function clickGridButton(id, action) {
switch (action) {
case “share”:
gantt.showLightbox(id);
break;
case “edit”:
gantt.showLightbox(id);
break;
case “add”:
gantt.createTask(null, id);
gantt.refreshData();

break;
case “delete”:
gantt.confirm({
title: gantt.locale.labels.confirm_deleting_title,
text: gantt.locale.labels.confirm_deleting,
callback: function (res) {
if (res)
gantt.deleteTask(id);
}
});
break;
}
}

Hello,

First task created ok, but when without refreshing i tried second new task in first task, it gaves me error

Screenshot - 33d017dbc1ef049bd3c93084f1cc2c97 - Gyazo

That error is related to the data type in the MySQL table:

Probably, you need to change the type to decimal(65,30)


2.In column Task name, can i do more width, if it needed like on screenshot automaticly, on the screen i have those setup, yes i can be fix if i will add width 200 or somth, but what if user gonna have 10 sublvl or smth

If you remove the scrollable: true and scrollX parameters from the grid in the layout configuration, it will resize the columns to fit all the available space.
Here is an example:
http://snippet.dhtmlx.com/a5af1824d


In buttons add/edit i have custom lightbox, if user will click on new button “share”, can i rewrite lightbox like on screen? ( write multiple
(Screenshot - 62fef52ddce61e745b2676736b7b6da0 - Gyazo) select , and select, send and cancel)
Screenshot - 5e71e0cf55f9c88ad1126b722145a1a8 - Gyazo

You can add custom elements in the lightbox and apply your functions:
https://docs.dhtmlx.com/gantt/desktop__custom_editor.html
And you can add third-party libraries:
https://docs.dhtmlx.com/gantt/samples/05_lightbox/14_jquery_multiselect.html

I don’t have a ready solution as on the screenshot, but I have the following sample that might help you to implement your solution(press “,” instead of “Enter” to add a new value):
http://snippet.dhtmlx.com/e5cd95638

Thanx for help and your time, but can i use this in free version ? width

https://docs.dhtmlx.com/gantt/desktop__specifying_columns.html#horizontalscrollbar

That method, that you write me, didnt work

Some help or advice would me helpfull

Hello,

Thanx for help and your time, but can i use this in free version ? width
https://docs.dhtmlx.com/gantt/desktop__specifying_columns.html#horizontalscrollbar
That method, that you write me, didnt work

You cannot resize the grid via the resizer like in the Pro version. But you can change the grid width parameter. The changes will be applied after you reinitialize Gantt. Here is the snippet:
http://snippet.dhtmlx.com/1d4c05c71