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

Changing the height of the dropdown list contents

Thread ID:

Created:

Updated:

Platform:

Replies:

143746 Apr 3,2019 05:40 PM UTC Apr 4,2019 07:33 AM UTC ASP.NET MVC 1
loading
Tags: DropDownList
Nate Greene
Asked On April 3, 2019 05:40 PM UTC

I currently am using the dropdownlist and cannot seem to change how long the dropdown list is when it is selected. It only shows the first 3 or 4 items and then cuts the rest off with the option to scroll down. I would like to increase the height of this so it can show more options at once when a user is using the search bar to filter

 I tried to use the setting .PopupHeight() and it doesnt seem to do anything but here is what my code is, what do I need to do to make the change that I need?

@Html.EJ().DropDownList("MenuItemsList").Datasource((List<MenuItemsDropdownModel>)ViewBag.RecipeDropdown).DropDownListFields(df => df.ID("MenuItemID").Text("Name").Value("MenuItemID")).ClientSideEvents(e => e.Change("onMenuItemSelect")).EnablePersistence(true).EnableFilterSearch(true).PopupHeight("600px").WatermarkText("Select a Menu Item").Width("100%")

Thanks,

Nate

Prince Oliver [Syncfusion]
Replied On April 4, 2019 07:33 AM UTC

Hello Nate, 

Thank you for contacting us. 
 
We have checked the reported issue in our end. This issue may occur due to enablePersistence property set to true in your sample and this maintains the previous height of DropDownList popup from browser cache. We suggest you check this in “Incognito window” and confirm it. You can also clear cache in your end, so that the sample will be rendered with the popupHeight, set in sample during initial rendering. We have used the below code in our sample. 
 
@Html.EJ().DropDownList("MenuItemsList").EnableFilterSearch(true).Datasource((List<Data>)ViewBag.RecipeDropdown).DropDownListFields(df => df.ID("MenuItemID").Text("Name").Value("MenuItemID")).WatermarkText("Select a Menu Item").Width("100%").EnablePersistence(true).PopupHeight("600px") 
 
We have attached the sample for your reference, please find the sample at the following link: 
 
DropDownList is rendered as shown below 
 
 
Please check this sample in your end and let us know if you need further assistance.  

Regards, 
Prince 


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