Click here to Skip to main content
15,891,864 members
Everything / Drop-down

Drop-down

drop-down

Great Reads

by Avelino Ferreira
The easiest way to implement the ToolStripControlHost and ToolStripDropDown classes, in a UserControl, in order to display a Container/Control beyond the limits of its Parent Container and Parent Form, with very few lines of code. Let's uncomplicate ...
by Puja Jagani
Using jTable instead of drop-down list.
by murtaza dhari
A generic dropdown control using LINQ to SQL and Entities using Reflection
by ASP.NET Community
Every time user’s complaints me about page scroll issues. For example: If a lengthy page having a dropdown list with AutoPostBack = true at bottom of

Latest Articles

by Robert Gustafson
Extended versions of ListBox and ComboBox controls which allow image, font, and colors for an individual item--along with multi-row/aligned-tab support for list box--and drop-down-list mouse-events/horizontal-scrollbar and custom drop-down buttons for combo box
by Evoluteur
A web color picker which looks like the one in Microsoft Office 2010
by Igor Krein
C# Extensions API for Entity Framework intended to simplify usage of drop-down lists, comboboxes and alike
by Avelino Ferreira
The easiest way to implement the ToolStripControlHost and ToolStripDropDown classes, in a UserControl, in order to display a Container/Control beyond the limits of its Parent Container and Parent Form, with very few lines of code. Let's uncomplicate ...

All Articles

Sort by Updated

Drop-down 

27 Oct 2023 by ashwini gaikwad 2021
The provided method is for filling the data in dropdown list. First, the selected index of dropdown is -1 but after Databind() method line, the selected index becomes 0 and first item of the list gets selected by default. I tried to set selected...
25 Oct 2023 by Richard Deeming
A DropDownList renders as a HTML element. : The HTML Select element - HTML: HyperText Markup Language | MDN[^] That element (with a size of 1) does not support a "no option selected" state; if none of the rendered...
11 Aug 2022 by Shivang Dubey(Shivi)
when a user click on that the dropdown options are visible to them and a user can select from the available I want to simulate the visibility of options without manual clicking on dropdown element. HTML code
11 Aug 2022 by Member 15735126
Hello, have you found a solution?
12 Apr 2022 by Robert Gustafson
Extended versions of ListBox and ComboBox controls which allow image, font, and colors for an individual item--along with multi-row/aligned-tab support for list box--and drop-down-list mouse-events/horizontal-scrollbar and custom drop-down buttons for combo box
24 May 2021 by BillWoodruff
Do you want the main panel to actually expand to reveal the second panel, or, do you want the main panel to remain the same size, but adjust the height of the first panel to reveal the second panel ? Clarify what "animation" means, in this case....
22 May 2021 by NotLGBT
I have two panels - panel2 and panelanimatoin. panelanimation is located on panel2. When i enter the area of panel, async method is activated. All is fine, but i can't uderstand, how to modificate code, that panelanimatoin goes back (return)...
14 Dec 2020 by InbarBarkai
In the comments section of the following link, it seems depricated: javascript - How can you programmatically tell an HTML SELECT to drop down (for example, due to mouseover)? - Stack Overflow[^]
14 Dec 2020 by Richard Deeming
You can simulate the click, but it won't cause the drop-down list to open. const element = document.getElementById("cohort"); const event = new MouseEvent("mousedown"); element.dispatchEvent(event); MouseEvent() - Web APIs | MDN[^] ...
2 Oct 2020 by Evoluteur
A web color picker which looks like the one in Microsoft Office 2010
8 Aug 2020 by Sandeep Mewara
Code in combobox selected change would be roughly: String[] files = System.IO.Directory.GetFiles("combobox selected path of folder"); for (i = 0; i
4 Aug 2020 by TheRealSteveJudge
First of all you must cast "sender" which is just an object to "ComboBox". Then you must get "SelectedValue". Finally you must get the files that are in the selected directory and use it as data source for the ListBox. private void...
4 Aug 2020 by Member 11396175
Good morning I think my question is very simple for your experience one combobox with specific path give me the folders that have in it I want when i select one folder from combobox the files in the folder placed in the list box. What I have...
4 Aug 2020 by Richard MacCutchan
See Path.GetFileName Method (System.IO) | Microsoft Docs[^].
22 May 2020 by Kasthuri Gunabalasingam
Hi There, I need to display data in table ,and one column should be a drop-down selection for updation. Drop-down need to be populate with already selected value in DB. Please check my code, and suggest a way to set selected value What I have...
24 May 2019 by JIYAUL MUSTAPHA
protected void dropdownlist1_SelectedIndexChanged(object sender, EventArgs e) { DropDownList ddlListFind = (DropDownList)sender; ListViewItem item1 = (ListViewItem)ddlListFind.NamingContainer; DropDownList getDDLList = (DropDownList)item1.FindControl("dropdownlist1");...
24 May 2019 by anthasaurus
9 May 2018 by RttlerGuy
So I'm creating an application that will use current gps location (lat/long). The user will have to select a specified radius (.5-100 miles) from a Spinner. Then, when clicked, there will be a Button (onClickListener()) that will populate the locations from a SQLite database, in that set radius,...
11 Mar 2018 by Dave Wilson from VA
When your 1st dropdown receives focus, can you use an event to delete and reload the values? wouldn't that essentially reset the dropdown so that the list starts at the top? It might slow things down a little but if it resolves your problem it might be worth it... D
11 Mar 2018 by Member 13714698
On my web form application, I am having a dashboard with six boxes each with a separate drop-down so that users can chose values (Menu-items forpages they visit most frequently) of their choice from database for their ease of accessibility. The drop-down is working fine and show the selected...
21 Aug 2017 by jdarmstrong
In our database a Lead = 0, whereas a Prospect = 1. I'm trying to make a drop-down where the users can select whether they are searching for a Lead or a Prospect and have it filter out the results. Will I be formulating some sort of "If, Then" statement? If "LeadOrProspect" = 0 Then ...
4 May 2017 by H.AL
I am trying to create a responsive website. I am using bootstrap 3.3.7 and jquery 3.2.0 with visual studio 2010 vb.net. Now I am trying to create a navigation bar with a dropdown menu. I want to add animation to this menu so I worked as first step with css by adding this to class dropdown and...
24 Apr 2017 by shekhardumala
Hi,Please need help guys,I have a button on the page , each time we click that adds dropdownlist items on to the page.So if i click the button 3 times so i will have 3 dropdownlist items on the page.Now the problem is i wants to validate them,I am using this.. var...
15 Dec 2016 by Member 9983063
Hello Guys, i want to know how to disable dropdown of combo box without disable combobox in c#What I have tried:Hello Guys, i want to know how to disable dropdown of combo box without disable combobox
15 Dec 2016 by Philippe Mori
You should essentially never do something that make a standard control behave in an unexpected way.If you don't want to show the list, then why are you using a combo box to start with?The simple approach is to leave the list empty. It is not the best UI both in many cases one might might...
23 Sep 2016 by Member 1003363
function update_name(id){ var xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txt").innerHTML=xmlhttp.responseText; } } ...
23 Sep 2016 by David_Wimbley
Unless you are forcing yourself to use plain javascript I would encourage you to look at jQuery. Also, I don't know what "I am getting the values and it displys in dropdown, but its not displaying in source code and not getting on form submit." means so I'll just ignore this part and give...
26 Aug 2016 by Igor Krein
C# Extensions API for Entity Framework intended to simplify usage of drop-down lists, comboboxes and alike
24 Aug 2016 by super_user
dropdown values according to rightsI have form.aspx in that there is dropdown
3 Aug 2016 by Avelino Ferreira
The easiest way to implement the ToolStripControlHost and ToolStripDropDown classes, in a UserControl, in order to display a Container/Control beyond the limits of its Parent Container and Parent Form, with very few lines of code. Let's uncomplicate ...
19 Jul 2016 by Puja Jagani
Using jTable instead of drop-down list.
1 Feb 2016 by Dhara Kanala
I have created a windows application which retrieve data from .dat file and convert it into datagridview(as per my requirement, it splits data into columns).Now column named "Grouptype" is there. I want to create a dropdownbox in that particular column. and it should be filled with the existing...
7 Oct 2015 by Ajay J Singh
Hi,I have created a WPF application, in which we are using webbrowser control to view asp.net website which is created according to latest IE-11Edge Mode.In this website we have multiple dropdown controls. when we click on the dropdown in webbrowser control, its popup container...
29 Sep 2015 by Sreekanth Mothukuru
Check the two links below on how to change page content based on the drop down select change. You need to use jQuery ajax $.Get methods to get data from the...
28 Sep 2015 by Member 11999641
hi, I got a drop down list. User upon selecting different value, I should get the option text of the option user has selected from the dropdown list, then go find the data from the database and display the relevant content on the webpage. If user change the option again, I should go retrieve...
26 Aug 2015 by KarstenK
Your question isnt so clear, so normally you can adjust properties of text and controls in the interface builder. It is the same with constraints.If you want to build apps for the Apple world ou must understand interface builder. Try it by watch some videos on youtube.
26 Aug 2015 by Jeyavijay Nedumaran
How to make a alignment from center to left using drop down meu in Xcode? will anyone explain this concept with a picture and by using constriaints i can't make it plss help and suggest me the solution
25 Aug 2015 by Member 11923591
I want to Ask how to copy Image using Drag and Drop java.I've been made Draggable Image from jlabel.and i want to my Image dragable can copy when i realesse my mouse (using DND)this is my mouse realesed and pressed.what should i do?private void...
8 Aug 2015 by Member 11011853
Hello...im trying to bind data from sqlserver database to dropdownlist placed in content/child page using jquery. I referred many articles, they specified only for plain webform, not to content pages.Its working fine in plain webform, and not in child pages...! my code is :
9 Jul 2015 by Member 11709123
I had an earlier question last month on dropdown issue and "F-ES SiteScore" username helped me achieve that.Click me function myFunction() { // append the whole html for a select document.getElementById("demo").innerHTML +=...
2 Jul 2015 by DrABELL
DropDownList Data Binding to Array (1D/2D), Enum and Dictionary objects in .NET
30 Jun 2015 by Dave Kreskowiak
So add a parameter to the link on the other pages that denotes which page they came from. The parameter will have to get picked up by the code in this page to tell it where the user came from.An alternate method is to look in the HTML request properties for the REFERER item. That will be the...
30 Jun 2015 by Member 11803895
Hey Guys,So I've been trying my best to figure this out on my own, but I'm completely stuck. I have a form for users to fill out. I also have links spread throughout my site that takes them to this form. I want to populate one of the dropdowns in that form based on where they came from. My...
26 Jun 2015 by Kush Kushal
I am making compatible my Asp.net 4.o web application from IE9 browser to IE11. some times as per program logic I have only one item to display in the dropdown list. I am using But, I am facing some compatibility issues. The drop down is...
25 Jun 2015 by Surendra Kandira
Metronic | UI Components - Custom Dropdowns Tags Support List ...
25 Jun 2015 by Surendra Kandira
How to implement as tag selected as multiple tag
23 Jun 2015 by Philippe Mori
Forget that. It make no sense to mimic old behavior on new browser. How other browser like Edge, Safari, Firefox, Chrome works? I don't thing that those details are defined and if so, then the new behavior would surely be the right one.By the way, the old IE way is a bad design. Why...
21 Jun 2015 by Member 11772633
Here is the jsfiddle code of my project http://jsfiddle.net/chintu/wmv1jkh9/[^] I want to create a drop down menu for fumehoods and furniture section.
11 Jun 2015 by Lalyka
I just solved itin case someone has the same problemin aspx part AddJQueryReference should be true
10 Jun 2015 by Lalyka
when I open the dropdowncheckbox and click "Select all" it selects all and when I uncheck Select all it unchecks all but when I want to check Select all again, it does not check all the optionsI Have a DropDownCheckBoxes
24 May 2015 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
I think that should be...@Html.DropDownList("UserName", ViewBag.User, "Select User")
24 May 2015 by diggudg
I'm getting above mention and not able to figure out what exactly error is.code is working fine for other but only for a single table i'm getting error.Please helpThis is controller code ViewBag.User = new SelectList(context.Users, "UserName", "UserName");this is View...
19 May 2015 by Member 11703653
How do I take this form on http://wodco.uk/promo/ and change the "last name" section into a dropdown list that matches the form style? I have edited the form on my end obviously to suite my use and for my use I need the drop down to display product types for example:[ Ex. Drop Down list...
3 Apr 2015 by Peter Leow
Put the select code blocks inside the form, so that it can be submitted. PHP Forms[^]
19 Mar 2015 by Makarand Borawake
I need to create/implement Editable Dropdown in HTML/CSS/Javascript. Editable means I search/filter drop down data. Please suggest way for it. Thanks.
19 Mar 2015 by Thanks7872
Though its not clear what you want,but i think you mean Dropdown with autocomplete functionality. Right? If it is,- Make normal JQuery AutoComplete- Add image to right of the textbox so that it looks like dropdown- Onclick of the textbox or image(Whatever your requirement is), add...
19 Mar 2015 by King Fisher
I hope you are looking for this;https://www.zoonman.com/projects/combobox/[^]
2 Mar 2015 by suneel kumar gupta
Please Check on this linkhttp://stackoverflow.com/questions/17013644/fill-drop-down-list-on-selection-of-another-drop-down-list[^]
27 Feb 2015 by Parth Mashroo
The Question in detail is how to populate second dropdown based on the value of first dropdown and what if both the dropdowns are in partial view and calling that partial view to my index page:My Controller:public ActionResult _Prepaid(){//PrepaidRechargeModel Pre = new...
22 Jan 2015 by Member 11394255
i tried to fix the errors but culd not as one error is on blank space at the first linesecond error is Cannot read property 'style' of null the control is defined still style not getting applied
22 Jan 2015 by Member 11394255
Multiselect Dropdown for Web Applications[^]using the code from above link but getting errorsUncaught SyntaxError: Unexpected end of input Uncaught ReferenceError: timoutID is not definedUncaught TypeError: Cannot read property 'style' of null Uncaught TypeError: Cannot read...
16 Jan 2015 by Syed Muhammad Ali Gardezi
Hello guys I wanted to know why doesn't my drop down menu works. When ever I click on categories the drop down menu doesn't appears. and I using bootstrap and to create a menu I am using a file called yamm and if you have any ambiguity about thne question please tell me. Thanks
25 Dec 2014 by patelv61
I have store proc which has 3 parameter in which there is startdate enddate and emptype which this three variable or parameter utilize populate datagrid or piechart from .NETCHART and piechart has click event which result in datagriidThank you very much
22 Dec 2014 by Maciej Los
Before you start, please apply changes suggested in solution1 by PIEBALDconsult[^].You can achieve that by extracting emptype to new table:--create new tableCREATE TABLE EmpTypes( EmpTypeID INT IDENTITY(1,1) TypeDescription NVARCHAR(50))--insert empTypesINSERT INTO...
22 Dec 2014 by patelv61
I have table emp in which there is emptype which includes temp, perm and seasonal.I am in need of find the information regarding all emptype or temp, perm and seasonal in dropdown.how can I do that? I am using C# in this project with sql server 2014And this is web application
22 Dec 2014 by PIEBALDconsult
You should have a translation table for referential integrity, you would then query that table, not the employee table.EmpTypeID Name1 Permanent2 Temporary3 SeasonalEmployeeID EmpType Name ...1 1 Bob2 1 Joe3 2 Bill
26 Nov 2014 by Praneet Nadkar
Hi,You should use cascading dropdown lists in your asp .net page.Check out these...
26 Nov 2014 by ahp-1984
Hi team, I have telerik kendo grid and has dropdown list inside it and grid is pop up editing grid. i am facing some issue when we edit the poup and change the value of dropdown.Issue 1When i click the Dropdown list of grid Poup is Coming out in Edit Mode but...
26 Nov 2014 by Monicavensaslas
I am trying to do a form in ASP.There are two dropdown list in my form.They are Client & SBU. SBU has the following values SBU1,SBU2,SBU3.If i am selecting SBU1 from SBU means, the client dropdown should contain only the client names that is assigned for SBU1.Similarly for all SBU's only...
5 Aug 2014 by Member 9245259
Dear all,I am working asp.net c# web application and database MySql.1. Select Customer code like 10385 from dropdown2. Auto fill up field : Customer Name: Md Syedur rahman3. Auto fill up field : Division : Dhaka4. Auto fill up field : District: Rajbari5. Auto fill up field :...
23 Jul 2014 by davekahn
An easy way to control the lists of options in multiple related SELECT controls
22 Jul 2014 by prabu19
Hi friends, I have three navigation menu in my mvc application. One of my navigation menu has more sub menu. It is hide some sub menus. How can i fix this issue?
18 Jul 2014 by kusuml
How can i ignore footer dropdown css while page load as common CSS apply on all dropdownThere are three dropdown, two for search in mid of page and one in footer.CSS common for all, I need to reduce the size of footer dropdown.Please reply
23 Jun 2014 by Anil Singh 2010
ICollection serviceContract = mapper.MapDALServiceContracts2BAL(objDalServiceContract.getAllServiceContract()); if (id > 0) { var sc = serviceContract.GroupBy(m => m.EndDate).Select(g => g.First()); }For more details...
9 Apr 2014 by Member 10606945
In my Dropdown im trying to Display all the news from a specific Department I have Departments with different ids in the database ...........public List getNewsType() { NewsDataContext objNews = new NewsDataContext(); // new instance of class var...
19 Mar 2014 by Tom Marvolo Riddle
It's pretty simple.Use SelectedIndexChanged event of dropdownlistTry this: protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { if (DropDownList1.SelectedItem.Text == "Monthly") { ModalPopupExtender2.Enabled = true; ModalPopupExtender2.Show();//popup...
19 Mar 2014 by Md.Ashraf Ali
I have dropdownlist with three values...1.Monthly2.Yearly3.Generaland an update panel where some design is made.i want to use modalpopup when user select monthly or selected index=1how to use target control id here.please any body could suggest me .Thank you
8 Mar 2014 by Krunal Rohit
Of course it is. As SA has said you can modify the code by yourself or rather you can implement by your own.Well one way is suggested by SA.And the other way is go for CSS. It could be a bit tricky, but once you understand it, it'd be more easy to work with it.Here you have to take care...
8 Mar 2014 by Sergey Alexandrovich Kryukov
No doubt it is possible. After all, menu is multi-level. What you need could be some combination of menu and drop-down control. I never saw such control, but, after all, http://www.ajaxtoolkit.net is open-source, so you can take the source and see how it is implemented and create your own...
8 Mar 2014 by Member 8566049
Hi guys,Is it possible to add another level on a drop down list such as it would look like drop down menu with sub categories?The usual one can be seen here http://www.ajaxtoolkit.net/DropDown/DropDown.aspx[^]and I was wondering if it is possible to add another sub category to the...
3 Mar 2014 by Raul Iloc
To preserve the same rendering like in IE10 and if not possible like in IE9, you should use the next setting in your master page (or pages) in the "head" section like in the next example:
3 Mar 2014 by Shubham Chakraborty
Is there any way to get old UI dropdown menu for asp:dropdown in IE-11i want it to work it in same way like in previous IE versions so that all menu item display downwards from the dropdown menu and the droopdown box is visible.if it is not possible please share a link from MSDN.. if...
24 Feb 2014 by karthik Udhayakumar
Hope this helps,http://msdn.microsoft.com/en-us/library/1ke6s1fc.aspx[^]All the Best:)
24 Feb 2014 by DFaeuster
Hi,in my MFC application I do have a toolbar with some dropdown buttons. These buttons are created with SetExtendedStyle(TBSTYLE_EX_DRAWDDARROWS)So they have 2 parts the user can press:1. Main button part2. Arrow button partIn different situations I want to disable some of these...
21 Dec 2013 by Er. Tushar Srivastava
Hi Friend,I understand the problems that beginners face. But I want to ask one, thing, do you have a logic ready in your mind. Logic is how the code is going to execute which doesn't imply any language boundary. This can be a simple flowchart or simple english like points approach. Here's an...
21 Dec 2013 by Member 10481102
I need to come up with an HTML page that provides 3 dropdowns for MonthName, Day, and Year. When user hits Submit, the date that was selected by the user is now formatted in this way: Month#/Day/Year along with the message "You have selected (date)."The dropdown list has to be done using...
3 Dec 2013 by _Lovro_
For Each row As GridViewRow In GridView1.RowsDim dropDownListText As String = CType(row.FindControl("DropDownList1"),DropDownList).SelectedItem.ValueResponse.Write(dropDownListText)NextThis seems to be working but now I am 50% doneProblem is that now I dont know since there can be...
3 Dec 2013 by fixthebugg
you can get it in row updating event like this..protected void YourGrid_RowUpdating(object sender, GridViewUpdateEventArgs e) { DropDownList ddl= (DropDownList )YourGrid.Rows[e.RowIndex].FindControl("ddlId"); string selectedvalue=ddl.selectedvalue; }
3 Dec 2013 by _Lovro_
I have very simple GridView as seen here called GridView1Inside of it I have dropdown list called DropDownList1
26 Nov 2013 by Abhinav S
This[^] may help.
26 Nov 2013 by walterhevedeich
This happens when your index is greater than the highest index of an array, in this case, the value array of the dropdownlist. Check your oldposts() if there is something similar to what was described.
26 Nov 2013 by teledexterus
Having a little trouble with dropdownlists and SelectedIndexChanged in activating oldposts().Here is my code:Protected Sub...
25 Nov 2013 by Ben Oats
OK, not perfect and is still Susceptible to SQL injection that I am still leaning how to fix but to get the query to work I have found this fix works well.MySqlCommand cd_price = new MySqlCommand(String.Format("SELECT Specie_Price FROM Animals WHERE Specie ='{1}' and Country ='{0}'",...
25 Nov 2013 by Sergey Alexandrovich Kryukov
Why would you ignore my answer to your previous question? It can cost you too much, because this is about security. Not only this is not concatenation (which is only a good thing), but making queries this way is absolutely vulnerable to SQL injection:correcting concatenation query. C# and...
25 Nov 2013 by Ben Oats
Hey guys still very new to C# and am very lost.I have two drop down list `ddlcountry`(Country) and `DdPetPist`(Specie) the country selection populates the Specie list with the specie avalible in the country selected.**code bellow** protected void Page_Load(object sender, EventArgs...
24 Nov 2013 by John Korondy
Your inaptly named "dropdownvalue" is of type DropDownList which cannot be assigned a string. Did you meandropdownvalue.SelectedItem.Value = "2" // RejectIn your DropDownList4 (again, can this have a better name, like DropDownApprovalStatus) has possible values of 1, 2 and 3 corresponding...
24 Nov 2013 by pradiprenushe
Type of dropdownvalue is DropDownList. So you can not set string to dropdownlist. I think you user wrong variable.Try thisif (dropdownvalue.SelectedItem.ToString() != ""){ dropdownvalues = dropdownvalue.SelectedItem.ToString();}else{ dropdownvalues = "Unavailable";}
24 Nov 2013 by CHill60
dropdownvalue is a DropDownList object. You can't assign a string to it, that would be meaningless. What you are actually trying to do is change the .Text displayed on the control, so try something like ... dropdownvalue.Text = "Unavailable".Note this will only work if "Unavailable" is...