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

How to manage drag&drop from one SfDataGrid to another

Hi,

I have on a window two SfDataGrid each binded to a different Collection datasource of the same base type.
I'd like to implement a drag&drop of records from one grid to the other.
The user should be able to select some rows in the first datagrid and drag&drop them to the second datagrid.
Is it possible to implement such a functionality ?
Have you some example that can show me how to implement it ?
Thank you.

Silvio

7 Replies

SV Srinivasan Vasu Syncfusion Team July 14, 2017 06:28 AM UTC

Hi Silvio,
 
Thank you for contacting Syncfusion support. 
We have analyzed on your query and you can drag and drop the rows by customizing GridSelectionController class and set the instance of that customized GridSelectionControllerExt class to SfDataGird.SelectionController and you can drag and drop the row using RowHeader. We have prepared a sample based on your requirement and attached in the below sample link 
 
Regards,
Srinivasan 



SI Silvio July 15, 2017 09:35 AM UTC

Thank you Srinivasan,


it is exactly what I needed. Thank you again !


Silvio



SV Srinivasan Vasu Syncfusion Team July 15, 2017 05:52 PM UTC

Hi Silvio, 
  
Thanks for your update. 
  
Please let us know if you need further assistance on this. 
  
Regards, 
Srinivasan 



SI Silvio August 22, 2017 09:37 AM UTC

Dear Srinivasan,


with your example it's all ok, but I have now a little extra problem.

In the dropped sfDataGrid I have a GridHyperlinkColumn column beside other columns.

I manage this column using the SfDataGrid.CurrentCellRequestNavigate event in order to navigate to another form of my app when the user clicks on cell of that column.

As soon as I substitute the default grid controller with GridSelectionControllerExt as you've done in your example, no SfDataGrid.CurrentCellRequestNavigate event is recalled yet when the user clicks on the hyperlinks.

What can I do to solve this little problem ?


Silvio



BR Balamurugan Rajaraman Syncfusion Team August 23, 2017 06:30 PM UTC

Hi Silvio 
 
We have checked your query “CurrentCellRequestNavigate is not re-triggered in the dropped DataGrid”. We are not able to reproduce the reported issue its working fine in our side. we have attached the tested sample for your reference. Could you please revert us the by modifying the provided sample based upon your application scenario to reproduce the reported issue in our side. It will be greatly helpful for us to analyze further. 
 
Please find the tested video and sample from the below link. 
 
 
 
Regards, 
Balamurugan R 



SI Silvio August 24, 2017 08:33 AM UTC

Thank you Balamurugan,

I see how in your example everything works fine.

Probably my example is more complicated and there are other changes I have made.

If I'm able to isolate the problem in a simple way that can be evaluatable for you, I'll send you an example.

Meanwhile thank you for your help.


Silvio



BR Balamurugan Rajaraman Syncfusion Team August 25, 2017 05:56 AM UTC

Hi Silvio 
 
Thanks for the update, 
 
We will wait to hear from you. 
 
Regards, 
Balamurugan R 


Loader.
Live Chat Icon For mobile
Up arrow icon