Answered by:
How to add scrollbar in dropdownlist control and how to stop repeating value in dropdownlist?

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:
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.- Proposed as answer by Wendy DZMicrosoft contingent staff Sunday, May 29, 2016 10:40 AM
- Marked as answer by Wendy DZMicrosoft contingent staff Tuesday, May 31, 2016 2:46 PM
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:
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.- Proposed as answer by Wendy DZMicrosoft contingent staff Sunday, May 29, 2016 10:40 AM
- Marked as answer by Wendy DZMicrosoft contingent staff Tuesday, May 31, 2016 2:46 PM
Monday, May 23, 2016 6:13 AM