locked
How to add scrollbar in dropdownlist control and how to stop repeating value in dropdownlist? RRS feed

  • Question

  • Hi,

    I am using dropdownlist control in my custom sharepoint application page.  Dropdownlist have many values,i want to add scrollbar in dropdownlist control so it will be easy for user to select the value. Also other issue i am facing in dropdownlist contol is that repeating value is coming in the dropdownlist.I don't want repeating value in dropdownlist. How to fix this issue.

    Please help me to achieve the same requirement.

    Saturday, May 21, 2016 2:02 PM

Answers

  • Hi Masroorul,

    For SharePoint dropdown list control, there is no property can set the scrollbar for the control.

    As a workaround, we can create a css style and the wrap the multiple option value for the dropdownlist control to display the scrollbar.

    Here is a demo for your reference:

    html select scroll bar

    For the duplicated values in dropdownlist, I would suggest you can check the dropdown list datasource and make sure the values in datasource is unique.

    Populate a Drop Down List with Unique Values from a list

    Thanks

    Best Regards


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Monday, May 23, 2016 6:13 AM

All replies

  • Hi,

    Please check this link below

    https://blogs.msdn.microsoft.com/mattlind/2008/02/12/bind-a-aspdropdownlist-to-a-sharepoint-list/


    Please remember to click 'Mark as Answer' on the answer if it helps you

    Sunday, May 22, 2016 7:45 PM
  • Hi Lakshmanan,

    My query is different.The link which you send me already i got that requirement.Now my query is  Dropdownlist have many values,i want to add scrollbar in dropdownlist control so it will be easy for user to select the value. Also other issue i am facing in dropdownlist contol is that repeating value is coming in the dropdownlist.I don't want repeating value in dropdownlist. How to fix this issue.Please reply for the same.

    Regards,

    Masroorul

    Monday, May 23, 2016 6:02 AM
  • Hi Masroorul,

    For SharePoint dropdown list control, there is no property can set the scrollbar for the control.

    As a workaround, we can create a css style and the wrap the multiple option value for the dropdownlist control to display the scrollbar.

    Here is a demo for your reference:

    html select scroll bar

    For the duplicated values in dropdownlist, I would suggest you can check the dropdown list datasource and make sure the values in datasource is unique.

    Populate a Drop Down List with Unique Values from a list

    Thanks

    Best Regards


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Monday, May 23, 2016 6:13 AM