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

Drag Drop Between Two Lists - Source List

Good Day,

I am struggling to query the relevant information regarding source and destination list, when items are dragged between two list box lists.

In the example below, I have b1 and b2 as lists, with the scope set to "combined-list".

1) I notice that when I drag from b1 to b2, the ListBoxEvent (Dropped) on b1 fires and not b2, which I would have expected -as I am dropping on b2.
2) The Syncfusion.EJ2.Blazor.DropDowns.DragEventArgs class, does not seem to provide the information to indicate from which list or to which list the item has been dragged.

Maybe I am not understanding something - I find the drag drop feature is advertised, but then missing in the documentation section of your website.

Any help would be much appreciated.

Kind regards,
Peter

                       <EjsListBox ID="b1" Scope="combined-list" AllowDragAndDrop="true" TValue="JobModel[]" DataSource="@UnSeqList" Value=@ValueUnSeq>
                            <ListBoxEvents Dropped="@onDropUnSeq" TValue="JobModel[]"></ListBoxEvents>
                        </EjsListBox>
                 
                        <EjsListBox ID="b2" Scope="combined-list" AllowDragAndDrop="true" TValue="JobModel[]" DataSource="@UnSeqList" Value=@ValueUnSeq>
                            <ListBoxEvents Dropped="@onDropSeq" TValue="JobModel[]"></ListBoxEvents>
                        </EjsListBox>

5 Replies

SP Sangeetha Priya Murugan Syncfusion Team September 24, 2019 11:20 AM UTC

Hi Peter, 
 
Thank you for contacting Syncfusion support. 
 
Query #1:  I notice that when I drag from b1 to b2, the ListBoxEvent (Dropped) on b1 fires and not b2, which I would have expected -as I am dropping on b2. 
 
We have verified your reported problem and we would like to let you know that based on our current architecture behavior while dragging from b1 to b2 the b1 drop event is triggered and from b2 to b1 the b2 drop event is triggered. 
 
Query #2: The Syncfusion.EJ2.Blazor.DropDowns.DragEventArgs class, does not seem to provide the information to indicate from which list or to which list the item has been dragged 
 
Currently, we have provided the Items and target as an argument. Could you please share the below details of this requirement to proceed further. 
 
1. Please share the detailed description about your requirement. 
2. What do you want to do in Dropped event based on the dragged item list and the target ListBox? 
 
Query #3: I find the drag drop feature is advertised, but then missing in the documentation section of your website 
 
We have considered this and we will refresh our online help site in our upcoming by-weekly release. Which has been scheduled to be rolled out in end of this month, we appreciate your patience until then. 
 
Could you please check the above sample and get back to us with the above requested information, based on that we will check and provide you a better solution quickly. 
 
Regards, 
Sangeetha M 



PE Peter October 3, 2019 08:38 PM UTC

Hi Sangeetha,

Thanks for your reply and apologies for the delay in my reply.

Point 1 accepted. Regarding Point 2: I have now attached a sample project to explain my issue.

When running this code, I experience:

1) That the Target from the arguments in the Dropped event is filled when an item is dropped onto another item. This is fine but seems that I need to map my C# list item to a DOM identifier, which I then again need to map to a list box. Seems too cumbersome?

The bigger problem here is though: When a list is empty, I have no item to drop another item on to - how does this then work?

Also, you will see in my example that the ListBox goes from “No Record Found” to a grey line, onto which no items can be dropped anymore when the ListBox is empty.

2) The Items object referred to in the "Dropped" events arguments is always null – as you can see in the Events section on the webpage

3) Strangely, items are duplicated when dragged from top to bottom - this is new since upgrading to the latest pre-release package 17.3.0.11-beta

I hope the attached sample, adequately demonstrates my problem.

At the end of the day, I simply want to:

1) provide a separate C# List<object> of objects to both List Boxes,

2) let the user re-arrange them using the UI and then ultimately

3) be able to sense in the code what the user has changed - ideally using the same List<object> variables which were provided to the ListBox controls.

Looking forward to your reply.

Kind regards,

Peter



Attachment: Syncfusion_DragDrop_e44fed69.zip


SP Sangeetha Priya Murugan Syncfusion Team October 4, 2019 04:36 PM UTC

 
Hi Peter, 
 
Thank you for your update. 
 
We have checked your reported issues based on your provided sample and we are able to reproduce it in our end. So, we confirmed this as a defect and planned to include the fix for this issue in our Essential Studio Volume 3 SP1 release. Which is expected to be available in end of this month, we appreciate your patience until then. You can track the status of this defect using below link from our feedback portal,  
 
 
Regards, 
Sangeetha M 




PE Peter October 8, 2019 05:33 AM UTC

Thanks for the feedback. I will await the next software update.


SP Sangeetha Priya Murugan Syncfusion Team October 8, 2019 05:43 AM UTC

Hi Peter, 
 
Thanks for your update. 
 
As promised, we will include the fix for the reported issue in our Essential Studio 2019 Volume 3 SP1 release and update you when released until then we appreciate your patience. 
 
Regards, 
Sangeetha M 


Loader.
Live Chat Icon For mobile
Up arrow icon