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.
Unfortunately, activation email could not send to your email. Please try again.

Row drag&drop

Thread ID:

Created:

Updated:

Platform:

Replies:

132921 Sep 28,2017 07:36 AM Oct 3,2017 08:46 AM ASP.NET MVC 3
loading
Tags: Gantt
Manolo
Asked On September 28, 2017 07:36 AM

Hi,

I need do drag&drop  on gantt, but I need avoid move the row as insertaschild, only inser above or insert below.

I would like remove that option insertasrowchild. and the icon.

How can I do it?




Suriyaprasanth Ravikumar [Syncfusion]
Replied On September 29, 2017 05:59 AM

Hi Manolo 
We can achieve your requirement by using “rowDrag” client side event. By using “dropPosition” property in “rowDrag” event argument we can validate the record drop position. 
This support was included in our Volume 3, SP1 release(15.3.0.29). If you are using earlier versions please upgrade your version to (15.3.0.29). 
Please refer the below code snippet to prevent drop record as child. 
<body> 
    @(Html.EJ().Gantt("GanttContainer") 
             
                 //.. 
                   .ClientSideEvents(cs => 
                            { 
                                cs.RowDrag("rowDrag"); 
                            }) 
             
            .Datasource(ViewBag.datasource) 
 
    ) 
    @(Html.EJ().ScriptManager()) 
 
    <script type="text/javascript"> 
 
        function rowDrag(args) { 
            if (args.dropPosition == "insertAsChild") { 
                args.canDrop = false; 
            } 
        } 
    </script> 
 
</body> 
  
We have also prepared a sample as per your requirement, please find the sample from the below location. 
  
Our Essential Studio 2017 Volume-3 SP–1 Release v15.3.0.29 is rolled out and it is available for download under the following link:                      
 
Please let us know if you require further assistance on this.  
 
Thanks,  
Suriyaprasanth R.  


Manolo
Replied On October 2, 2017 07:00 AM

Thanks!


Suriyaprasanth Ravikumar [Syncfusion]
Replied On October 3, 2017 08:46 AM

Hi Manolo, 

Welcome. 
Please let us know if your require further assistance. 
 
Regards, 
Suriyaprasanth R. 


CONFIRMATION

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.

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.

;