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

ListBox missing data-uid prop on list item

I have some logic dependent on the id of the list item. ListView has a property data-uid on the li element which corresponds to the id of the element, while ListBox component has instead the property data-value with alphabetic values. 

Comparison between ListView component and ListBox component:

How can I get the id of the item in the list in a different way from here without the data-uid in a Listbox?

3 Replies

YA YuvanShankar Arunagiri Syncfusion Team March 10, 2023 07:34 AM UTC

Hi Ana,

We have validated your reported query and using the below code snippet, we can get the li element of specific list box item.


If we are misunderstanding your query, please share more details about your requirement & use case. Based on that we will check and provide you a better solution quickly.

Check with attached sample code file and get back to use if you need any further assistance on this. 


YuvanShankar A

Attachment: App_e46eb663.zip

AV Ana Vasilcoiu March 10, 2023 10:15 AM UTC

Hi YuvanShankar, 

With your query I can indeed get the li element of the selected item. However, what I want to do is add an event on a double click of an item and get the actual id or value of the double clicked element. 

So that's why I compared with the ListView, because there I could use the data_uid to retrieve the value of the element from the options array. Is there a way to do this in the ListBox component as well? 


Ana V

YA YuvanShankar Arunagiri Syncfusion Team March 13, 2023 11:15 AM UTC


We have prepared the sample based on your requirement. kindly refer to the below code snippet and attached sample code file.


  <div v-on:dblclick="doubleClick">

    <ejs-listbox :dataSource='data'></ejs-listbox>




  methods: {

    doubleClick: function(args) {





Get back to use if you need any further assistance on this. 

Attachment: App_b42fcdf8.zip

Live Chat Icon For mobile
Up arrow icon