Drag and drop events

I'm trying using your demo from documentation describing the drag and drop use of the listbox component but after dropping an item in the second list, how can I get the list content ? the list seems to be ampty, even if I dropped an item and the item is visible in the second list
 
In the attachment sample, when you drop an item from the left list to the right, the item is added correctly but when you click on the "check" button the GroupB list seems to be empty

Thanks
Best Regards


Attachment: BlazorApp1_c924bf6f.zip

3 Replies 1 reply marked as answer

GK Gayathri KarunaiAnandam Syncfusion Team March 9, 2021 10:16 AM UTC

Hi Walter, 

Thank you for contacting Syncfusion support. 

We have checked your reported query. We would like to let you know that datasource count property will not get incremented after the Listbox items are moved. We can check the Listbox items count by using the GetDataList method as demonstrated in the below code snippet. 

Index.razor: 

public void onclick() 
{ 
 
        var list2 = listbox2.GetDataList(); 
        if (list2.Count() > 0) 
            result = "works"; 
    } 
  
For your reference, we have modified the provided sample. Please check the below link. 
 

Please check the above sample and get back to us, if you need further assistance. 

Regards, 
Gayathri K 


Marked as answer

WM Walter Martin March 9, 2021 01:17 PM UTC

Great, it works!
Thanks



GK Gayathri KarunaiAnandam Syncfusion Team March 10, 2021 04:58 AM UTC

Hi Walter, 

Thanks for the update. 

We are happy to hear that your requirement has been fulfilled. Please feel free to contact us if you need any further assistance on this. 

Regards, 
Gayathri K 
  


Loader.
Up arrow icon