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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Multiple insert and Indent

Thread ID:





121117 Nov 11,2015 07:34 PM UTC Nov 12,2015 12:49 PM UTC ASP.NET MVC 1
Tags: Gantt
Andrea Perazzolo
Asked On November 11, 2015 07:34 PM UTC

I am in need to perform the following operation.
When not selecting any row in the Gantt I need, when pressing the Add Record Toolbar button to insert 2 records, a parent and a child.
I am trying to use the various events and interact with javascript, but I am not able to set a parent item manually to the second record I am adding.
Could you provide a sample that shows me how I can do this operation.

       Thanks in advance

     Andrea Perazzolo

Mahalakshmi Karthikeyan [Syncfusion]
Replied On November 12, 2015 12:49 PM UTC

Hi Andrea,
We can insert 2 items while pressing toolbar add record button while we haven`t select any record, one as parent and one as child to the same task with the help of "ActionComplete" click side event. Please refer the following code example for details.









  <script type="text/javascript">

      function actioncomplete(args){

          if (args.requestType == "save") {

              var obj = $("#Gantt").data("ejGantt");

              if (obj.model.selectedRowIndex == 0) {

                  var record = $.extend({},args.addedRecord.item);

                  obj.addRecord(record, "child");





You can also indent and outdent any task to make then child as well parent task using toolbar indent and outdent buttons. Please refer the following screen shot for details.

We have also prepared a sample based on this and you can find the sample under the following location.
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/GanttSample-566317427
Mahalakshmi K.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon