RadiantQ jQuery Gantt Package
Handling the editing feature of GanttTable
Previous Topic  Next Topic 

GanttTable has an option to handle the editing the feature of GanttTable using the "startEdit" and "endEdit" options.


startEdit

 

To let decide whether the editing should begin or not at the time of edit begins. It will be useful when you prevent the editing for specific row/cell value based on your own conditions. This option get trigger when the user start editing the table cell values and return false to prevent the editing.


Here is the code example:


$('#gantt_container').GanttControl({

    GanttTableOptions: {

        startEdit: function (cell, dataItem, column) {

            // Preventing the Recurring Tasks row from edit.

            if (dataItem.Activity_M().DataSource_M().RecurringInfo_M() != null)

                return false;

        }

    },

});



endEdit


To let decide whether the changed value should submit or not after the editing is done. It will be useful when you need to handle the value before submitting, and cancelling the submit process based on some validations. This option get trigger when the user submitting the edited cell value and return false to prevent the submitting.



Here is the code example:

 

$('#gantt_container').GanttControl({

    GanttTableOptions: {

        endEdit: function (cell, dataItem, column) {

            // Preventing the Recurring Tasks row from edit.

            if (dataItem.Activity_M().DataSource_M().RecurringInfo_M() != null)

                return false;

        }

    },

});



This is illustrated in this samples:

In HTML                : ..\Samples\RecurringTasks.htm.




� RadiantQ 2022. All Rights Reserved