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
close icon

Grid to Grid Drag and Drop example documentation Issues

Hi,

I'm checking the example code located on this page

https://help.syncfusion.com/aspnetmvc/grid/row?cs-save-lang=1&cs-lang=csharp

the drag and drop between grid example. I have a project that I need to drag and drop between grids. I already added that and it is working fine.
I found some issues that I need your help solving.

1. I got an error in javascript sometimes

ej.web.all.min.js:10
Uncaught TypeError: Cannot read property 'rowDropSettings' of undefineddrop @ ej.web.all.min.js:10
_drop @ ej.web.all.min.js:10
i @ jquery-1.10.2.min.js:21
dispatch @ jquery-1.10.2.min.js:22
v.handle @ jquery-1.10.2.min.js:22


2. In the example, you have 4 methods in the controller
 public ActionResult RowDragHandler(List<EditableOrder> deleted)
 public ActionResult RowDropHandler(List<EditableOrder> added)
 public ActionResult RowDragHandler2(List<EditableOrder> deleted)
 public ActionResult RowDropHandler2(List<EditableOrder> added)

Those methods do not seem to do anything. I debug and nothing happened.

3. I need to have the property .AllowRowDragAndDrop() in both grids (source and destination) active and inactive on demand.
  I added the method connected to the second grid on a custom button. But, I got the error gridObj.AllowRowDragAndDrop is not a function.
  How can I achieve this behaviour?

4. I need to do a preprocessing as soon as the grid register the new object coming from the source grid into the destination grid. I need to take the object transported into and convert it into a new type of object and send a post to the backend. I know how to do the send. I only need to understand how to create a custom method for pre-processing the object when Drop event finished.

I have attached the project and some images of the issues.
 
Kind regards,

Juan

 



Attachment: SyncfusionMvcApplication14_db80e230.7z

3 Replies

RU Ragavee U S Syncfusion Team October 6, 2016 10:53 AM UTC

  
Hi Juan, 

Thanks for your interest in Syncfusion products. 

Query #1: I got an error in javascript sometimes  

We are unable to reproduce the reported issue in the provided sample. So could you share the replication procedure in order to replicate the issue? 

Also, if possible, please share the video demo of the issue that you are facing. 

Query #2: Those methods do not seem to do anything. I debug and nothing happened. 

The row drag and drop events will be triggered only upon using adaptors. These events are used to handle the dragged/dropped records and update the database accordingly. As you can see, in the documentation, we have used the remoteSaveAdaptor for binding dataSource to Grid.  

Please refer to the below documentation for more information on the data adaptors. 


Query #3:  I need to have the property .AllowRowDragAndDrop() in both grids (source and destination) active and inactive on demand. 

We considered this query “SetModel support for AllowDragAndDrop feature” as a usability feature and a support incident has been created under your account to track the status of this feature. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents  

Query #4: I only need to understand how to create a custom method for pre-processing the object when Drop event finished.  

The rowDrop client side event event of the grid triggers when the row is being dropped. The args.data parameter of the rowDrop event returns the row data’s’ corresponding to dragged rows using which you can preprocess and send a post to the controller. Please refer to the below documentation for more information on the rowDrop event. 
 

Regards, 
Ragavee U S. 



JA Juan Acosta October 7, 2016 02:10 AM UTC

Hi Ragavee,

Thanks for your reply.

As you requested, I have attached:

  1. New project with RowDrop functionality still not working based on the example in razor#grid-to-custom-control on the page https://help.syncfusion.com/aspnetmvc/grid/row. I followed the procedure there to overflow the events, and stil the grid is not calling the RowDrop event in the javascript.
  2. Gifs (1475803961752.gif, 1475804534139.gif ) with examples of issues in javascript. the procedure to reproduce the issue is it the following: load the page and select the first row. Then move the dialog to one side to access the underline row. As soon as, you finished moving the dialog the grid is firing the stopDrop event (I assume). That triggers and error of undefined methods.
  3. I removed the methods: RowDragHandler(List<EditableOrder> deleted),  RowDropHandler(List<EditableOrder> added),  RowDragHandler2(List<EditableOrder> deleted),   RowDropHandler2(List<EditableOrder> added).

Could you please check the issue with the RowDrop event that it is not registered and the erratic issue in the DropSettings.

Kind regards,

Juan


Attachment: SyncfusionMvcApplication14_82354483.rar


RU Ragavee U S Syncfusion Team October 7, 2016 07:31 AM UTC

Hi Juan, 

We considered this query “Script error obtained when dragging and dropping dialog to droppable grid” and “rowDrop, rowDrag, rowDragStart events not fired in unobtrusive mode” as issues and a support incident has been created under your account to track the status of these issues. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents   

Regards, 
Ragavee U S. 


Loader.
Live Chat Icon For mobile
Up arrow icon