[CSHTML]
<body>
@(Html.EJ().Gantt("GanttContainer")
//..
.ClientSideEvents(cs =>
{
cs.BeginEdit("BeginEdit");
cs.ActionBegin("ActionBegin");
})
//..
)
@(Html.EJ().ScriptManager())
<script type="text/javascript">
//Event trigger at the cell edit
function BeginEdit(args) {
if (args.columnIndex == 1) {
$(args.cellElement).focusin(function (arg) {
$("#" + arg.target.id).attr('maxlength', '15');
});
}
}
//Event trigger at the dialog edit
function ActionBegin(args) {
if (args.requestType == "beforeOpenEditDialog") {
$("#GanttContainertaskNameEdit").attr('maxlength', '15'); // GanttContainer is id of Gantt control
}
}
</script> |
Thanks it's working fine.
can you please give us references URL from where we can find this kind of solution with example.