automatically increase the width of the dropdownlist according to the item

I want to automatically increase the width of the dropdownlist according to the item.

Hello.

I am using syncfusion ej2 es5 (bootstrap4), but if the width of the dropdownlist is auto, it is too wide. And because the width of the item is searched in the DB and the width is changed, neither the item nor the selected item is visible. 



Even if the maximum width of an item in the dropdownlist is selected, such as column Autofit in the grid, we ask if it can be automatically adjusted to the width so that'...' is not visible in the dropdownlist.

Thank you.

Attachment: SyncfusionEJ2ES5_Dropdownlist_sample_deaf9a08.zip

1 Reply 1 reply marked as answer

PM Ponmani Murugaiyan Syncfusion Team October 7, 2020 04:31 PM UTC

Hi Jeongkyu, 

Thanks for contacting Syncfusion support. 

Yes you can increase the popup width using the property popupWidth as like below code snippet. 

var listObj = new ej.dropdowns.DropDownList({ 
    //set the data to dataSource property 
    dataSource: sportsData, 
    width: 'auto', 
    popupWidth: 'auto' 
}); 
listObj.appendTo('#ddl'); 



Regards, 
Ponmani M 


Marked as answer
Loader.
Up arrow icon