Our state of the art Gantt chart


Post by rahulranjan »

Okay Thanks when is the next release

Post by rahulranjan »

Hi mats
Right now to achieve what can we do . can you suggest .

Post by pmiklashevich »

Please use Gantt 1.0.1

Pavlo Miklashevych
Sr. Frontend Developer


Post by rahulranjan »

Hi I implement but one error
import { ResourceAssignmentColumn, AssignmentGrid, CellEdit, NumberColumn, ColumnStore, Override, AssignmentField, LocaleManager } from 'bryntum-gantt';
class CellEditFeatureOverride {
    static get target() {
        return {
            class: CellEdit,
            product: 'gantt'
        };
    }

    startEditing(cellContext = {}) {

        const me = this;

        if (!(me.editorContext || me.grid.readOnly || me.grid.disabled)) {
            const normalizedContext = me.grid.normalizeCellContext(cellContext),
                record = me.store.getById(normalizedContext.id);

            if (record.name === 'Linda') {
                return false;
            }
        }

        return this._overridden.startEditing.call(this, cellContext);
    }
}

Override.apply(CellEditFeatureOverride);

Error
When clicking on cell it gives error
core.js:1673 ERROR TypeError: Cannot read property 'getById' of undefined
    at CellEdit$1.startEditing (OverrideAssignment.js:16)
    at CellEdit$1.onCellDblClick (gantt.module.js:140)
    at Gantt.trigger (gantt.module.js:9)
    at Gantt.triggerCellMouseEvent (gantt.module.js:140)
    at Gantt.onElementDblClick (gantt.module.js:140)
    at RegionResize.functionChainRunner (gantt.module.js:21)
    at Gantt._0x65b84e.<computed> [as onElementDblClick] (gantt.module.js:21)
    at Gantt.handleEvent (gantt.module.js:140)
    at HTMLDivElement._0x48900f (gantt.module.js:9)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)

Post by mats »

We cannot help without a clear test case I'm afraid.

Post by rahulranjan »

Hi
I want to disable resource assignment for some of the task. For that i have overrided the cellEdit class but it is giving error. Please let me know if you want some thing else

Post by pmiklashevich »

Please attach you testcase here, so we can check

Pavlo Miklashevych
Sr. Frontend Developer


Post by rahulranjan »

Hi pmiklashevich

Thanks for reply . I have implemented the same way you have told above. But it is giving error which i have posted in my previous post.
Attachments
New Asiignment.png
New Asiignment.png (29.02 KiB) Viewed 1892 times

Post by pmiklashevich »

Before give that override to you, I checked if it works. I saw no errors and it worked good. So please zip your project up and attach here, so I can see what exactly you're doing in the code.

Pavlo Miklashevych
Sr. Frontend Developer


Post by pmiklashevich »

Btw, this override is not needed anymore. Please check out beforeCellEditStart event. Docs here: https://www.bryntum.com/docs/gantt/#Grid/feature/CellEdit#event-beforeCellEditStart

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply