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

get all data from dual list box

Hi, I am following this example - https://ej2.syncfusion.com/angular/documentation/list-box/dual-list-box/

When I move items from listbox1 to listbox2, I would like to get a complete list all the data items in listbox2, along with their Ids, upon clicking a custom button. 

5 Replies

VK Vinoth Kumar Sundara Moorthy Syncfusion Team September 4, 2019 12:07 PM UTC

Hi Jose,  
 
Good day to you. 
 
We have checked your requirement, we have achieved to get the second ListBox datasource by clicking the custom button. For your convenience we have prepared a sample. 
 
 
Could you please check the above sample and get back to us for further assistance on this? 
 
Regards, 
Vinoth Kumar S 



JL jose lara September 9, 2019 01:26 AM UTC

thx. This works as expected. Can you also tell me how I could check the length of the array listObj2.dataSource in your example? This doesn't seem to be a regular array. How can I find out if there are any items in this list?




AB Ashokkumar Balasubramanian Syncfusion Team September 9, 2019 12:44 PM UTC

Hi Jose, 
 
Query: Can you also tell me how I could check the length of the array listObj2.dataSource in your example? 

You can get the length of the second ListBox data source use ”(this.listObj2.dataSource as any).length” code block
 

Please find the modified sample link:

 
 
Could you please check the above sample and get back to us for further assistance on this? 
 
Regards, 
Ashokkumar B. 



JL jose lara September 10, 2019 12:35 AM UTC

this works. thx


VK Vinoth Kumar Sundara Moorthy Syncfusion Team September 10, 2019 07:19 AM UTC

Hi Jose, 
  
You are most welcome. Please feel free to contact us if you need any further assistance on Syncfusion components. 
  
Regards, 
Vinoth Kumar S 


Loader.
Live Chat Icon For mobile
Up arrow icon