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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ListBox select event not working as expected

Thread ID:

Created:

Updated:

Platform:

Replies:

149157 Nov 16,2019 05:07 AM UTC Nov 20,2019 06:43 AM UTC Angular - EJ 2 3
loading
Tags: ListBox
Sathyanarayanan Srinivasan
Asked On November 16, 2019 05:07 AM UTC

Hi,

I am using ListBox exactly as described in the documentation site. Functionally it works good: dataSource loaded, the Fields property taking effect, I can interact with it.

I add (select) event to the ejs-listbox to be able to adjust data on other user inputs/ controls. The event is not firing. 

I am also defining the following css to make the selected item look more visible to human eyes of all strengths. I can see the list items change the selected status when I inspect the html elements, but the styles take no effect.

.e-list-item .e-selected {
background-color: red;
color: white;
}

I am using syncfusion @17.3.26. Please help point me to the right direction... what am I missing here?

Thanks and best regards,
Sathya

Madhan Venkateshan [Syncfusion]
Replied On November 18, 2019 05:33 AM UTC

Hi Sathya, 
 
Good day to you. 
 
Query #1: I add (select) event to the ejs-listbox to be able to adjust data on other user inputs/ controls. The event is not firing.  
 
Sorry for the inconvenience caused. We have depreciated select event instead we provided change event and it will fire when you select the listbox items and also prepared a sample to log the change event in the console, please refer the below link 
 
 
Query #2: I can see the list items change the selected status when I inspect the html elements, but the styles take no effect. 
 
We would suggest you to increase the css specificity to override the existing css styles. Please refer the below code snippets 
 
App.component.css 
.e-listbox-wrapper .e-list-item.e-selected { 
    background-color: red; 
    color: white; 
} 
  
Regards, 
Madhan V 


Sathyanarayanan Srinivasan
Replied On November 19, 2019 03:52 AM UTC

Thank you Madhan. Works like a charm :)

Madhan Venkateshan [Syncfusion]
Replied On November 20, 2019 06:43 AM UTC

Hi Sathya, 
 
Thanks for your update, Please feel free to contact us if you need any further assistance on this. 
 
Regards, 
Madhan V 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon