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

How to display e-template when element is selected

I have a question about your ejDropdownList control. 
How can I display my e-template on selected element.
Below I enclose two screenshots.

scope.eTemplate =
'<div>' +
     '<i class="fa ${cssClass}"></i> ' +
     '&nbsp; ${text}' +

Best regards,

1 Reply

PO Prince Oliver Syncfusion Team June 12, 2017 12:37 PM UTC

Hi Karol, 

Thank you for contacting Syncfusion support. 

By default, the DropDownList displays only the text of the data item. To image along with the text  we need to customize the selected data to show the custom visual element in the DropDownList’s input element. Kindly refer to the following UG link for more information: https://help.syncfusion.com/js/dropdownlist/howto#select-the-image-rather-than-the-text-from-the-dropdownlist-when-the-template-concept-is-used 

We have prepared a sample as per your requirement. Kindly refer to the following Playground sample: https://jsplayground.syncfusion.com/szmbt3n3 


Live Chat Icon For mobile
Up arrow icon