{
field: 'Tracker',
headerText: 'Tracker',
editType: 'dropdownedit', width: 150,
edit: {
params: {
query: new ej.data.Query(),
dataSource: ganttJSData.projectResources.taskTrackers,
fields: {text: 'text', value: 'value'},
}
},
},
var ganttChart = new ej.gantt.Gantt({
//...
columns: [
//...
{
field: 'customColumn', headerText: 'Tracker', edit: {
create: function () {
elem = document.createElement('input');
return elem;
},
read: function () {
return multiSelectObj.value;
},
destroy: function () {
multiSelectObj.destroy();
},
write: function (args) {
multiSelectObj = new ej.dropdowns.MultiSelect({
dataSource: tracker,
fields: { text: 'Name' },
mode: 'CheckBox',
});
multiSelectObj.appendTo(elem);
}
}
},
],
}); |
S.No |
Queries |
Syncfusion Comments | |
1
|
Also if you click edit on the toolbar it doesn't show the dropdownCheckbox on the tracker in your example.
|
Currently we have support to render custom editor only for cell editing. We will consider this as a feature and we have logged a feature report for this. You can track its status from below feedback link.
We will implement this and include in our upcoming Volume 4, SP1 release which is expected to be rolled out in the month of January 2020.
| |
2
|
how can I make it request with the Id not with the Name, but also after editing to still display the name
|
From your query we understand that, you want to display the Id in drop down and after selecting the Id, the respective names should be displayed in the cell. This can be achieved by using the fields property of MultiSelect control.
Please find the below code example.
Please find the below sample link.
Is this your requirement? Else share us in detail what you want to display in the dropdown? |
var ganttChart = new ej.gantt.Gantt({
//...
columns: [
{
field: 'customColumn', headerText: 'Tracker', edit: {
//...
write: function (args) {
multiSelectObj = new ej.dropdowns.MultiSelect({
dataSource: tracker,
fields: { text:'Name', value: 'Name' },
select: function(args){
console.log(args.itemData.Id)
},
mode: 'CheckBox'
});
multiSelectObj.appendTo(elem);
},
}
},
//...
],
});
ganttChart.appendTo('#Editing'); |