We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Cannot add new row


I have a problem with adding new rows to Gantt. When I try to add a new row, I get an error (check console).
I attached my code with the problem.
First, you have to open a terminal in the folder and install all npm packages (command "npm i"). Then you can open file index.html.

Best regards,
Tomasz Tomczykiewicz

Attachment: addRecord_805119cf.zip

3 Replies

JD Jayakumar Duraisamy Syncfusion Team January 9, 2019 08:53 AM UTC

Hi Tomasz, 
We have analyzed the attached files and noticed that rowPosition property is assigned with “ej.TreeGrid.RowPosition.Above” in “addRecord” method. It is not a valid rowPosition for Gantt hence the reported issue occurs.  
Please find the valid enum values for Gantt row position: 
·         ej.Gantt.RowPosition.Top 
·         ej.Gantt.RowPosition.Bottom 
·         ej.Gantt.RowPosition.AboveSelectedRow 
·         ej.Gantt.RowPosition.BelowSelectedRow 
·         ej.Gantt.RowPosition.Child 
Please find the code example below: 
                headerText: 'task', 
                menuId: 'AddAboveMilestone', 
                parentMenuId: 'AddAbove', 
                eventHandler: function (args) { 
                this.addRecord(args.data, ej.Gantt.RowPosition.AboveSelectedRow); 
We have also modified the attached sample for your reference. Please find the sample from below location 
Please let us know, if you need any other assistance. 
Jayakumar D 

TT Tomasz Tomczykiewicz January 22, 2019 10:28 AM UTC

Hi Jayakumar,

Thank you for your help. It solved my problem.

Best regards,
Tomasz Tomczykiewicz

JD Jayakumar Duraisamy Syncfusion Team January 22, 2019 10:58 AM UTC

Hi Tomasz, 
Thanks for your update. 
We are glad to hear that your problem was resolved.  
Jayakumar D 

Live Chat Icon For mobile
Up arrow icon