We have few columns in AnyChart Gantt chart. If we enable edit in DataGrid, all the columns are made editable. Is there option to allow edit only for few columns? Please advise.
Yes, for these columns you need to return a special object. For example, you need to prohibit editing for columns 0 and 2 (zero based indexes).
var dataGrid = chart.dataGrid();
// Set initial text for the input.
dataGrid.onEditStart(function () {
if (this.columnIndex == 0 || this.columnIndex == 2)
return {cancelEdit: true};
return {value: this.value};
});
For details, check the live sample.