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

Can't get row drag & drop to work within a single grid

Thread ID:





127636 Nov 29,2016 03:03 PM UTC Dec 5,2016 11:11 AM UTC ASP.NET MVC 6
Tags: Grid
R Brian Lindahl
Asked On November 29, 2016 03:03 PM UTC

I'm trying to replicate the example in the documentation for re-ordering rows in a grid using drag & drop. When I run it, it lets me drag the row, but the drop handler is never called to save the data into the database.

I've attached my project. You'll need to add a few sample rows, as i didn't implement the basic row editing 'save' handler.

Attachment: SyncfusionMvcApplication6_de55d162.zip

Jayaprakash Kamaraj [Syncfusion]
Replied On November 30, 2016 04:02 PM UTC

Hi Brain, 
Thank you for contacting Syncfusion support. 
If sorting operation is performed in Grid means we have prevented the row drag and drop event handler. Because, if you reorder a row when a column is sorted in Grid it will change the sorting behavior. So, we suggest you to set sortedColums as empty array in RowDragStart event of Grid. Please refer to the below code example 
//.Datasource(ds => .. 
.Columns(col => 
<script type="text/javascript"> 
    function rowdragstart(args) { 
        this.model.sortSettings.sortedColumns = []; 
Jayaprakash K. 

R Brian Lindahl
Replied On December 1, 2016 08:56 PM UTC

Thanks - I see the point.

Would a better solution be to have the datasource pre-sorted, and just turn off sorting in the grid?

R Brian Lindahl
Replied On December 1, 2016 10:03 PM UTC

I tried it without the .AllowSorting and .SortSettings, but it still doesn't work. Further suggestions?

Jayaprakash Kamaraj [Syncfusion]
Replied On December 2, 2016 01:01 PM UTC

Hi Brian, 
We were unable to reproduce the issue at our end. Please refer to the below video. 

Please share the following information to find the cause of the issue.    
1.     Share the video to show the issue. 
2.     Is there any script error or exception thrown in your project? If so, attach the screenshot of your stack trace.    
3.     Attach screenshot of the POST request in Network tab of browser developer tool. Please expand the post request and share the screenshot. 
4.     Browser details.   
Jayaprakash K. 

R Brian Lindahl
Replied On December 2, 2016 02:49 PM UTC

Tried it again this morning, and it does indeed work OK. Thanks for the help.

Jayaprakash Kamaraj [Syncfusion]
Replied On December 5, 2016 11:11 AM UTC

Hi Brian,  
We are happy that the problem has been solved. 
Please get back to us if you need any further assistance.   
Jayaprakash 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