dropdownlist

ASP.NET Dropdownlist selectedindexchanged event not firing on up / down arrow

I have a server dropdownlist in an Ajax updatepanel. When I use the mouse to click on an item it fires the postback but when I click the up/down arrow to change entries, this is not firing. What could be reason? ...

C# - Dumping a list to a dropdownlist

List<String> nameList = new List<String>(); DropDownList ddl = new DropDownList(); List is populated here, then sorted: nameList.Sort(); Now i need to drop it into the dropdownlist, which is where I'm having issues (using foreach): foreach (string name in nameList){ ddl.Items.Add(new ListItem(nameList[name].ToString())); } No...

Implementing an editable DropDownList in ASP.NET

What's the most elegant way of implementing a DropDownList in ASP.NET that is editable without using 3rd party components. As a last resort I will probably try using a TextBox with an AutoCompleteExtender with an image to 'drop down' the list; or a TextBox overlapping a HTML Select with some JavaScript to fill values from the Select to ...

Save state for DropDownList after post

Hi, i have form with one textbox and dropdownlist <%=Html.TextBox("Name")%> <%=Html.ValidationMessage("Name", "Enter name")%> <%=Html.DropDownList("Not Selected", "DomainID", ViewData["DomainID"])%> I select value from drop downlist but dont fill name, im getting validation for textbox and then i need select value from dropdown agai...

DropDownList doesn't show enough rows

In ASP.NET, a ListBox has a Rows attribute I can set to say how many rows to show. A DropDownList, though, doesn't. Is there any way I can set the maximum number of rows a DropDownList should display? Code? Markup? CSS? ...

Asp.net - Add blank item at top of dropdownlist

Hi, Why is the dropdown not showing my blank item first? Here is what I have drpList.Items.Add(New ListItem("", "")) With drpList .DataSource = myController.GetList(userid) .DataTextField = "Name" .DataValueField = "ID" .DataBind() End With Edit ~ I am binding to a Generig List, could this be the culprit? ...

Getting ID of embedded ASP Object using JavaScript and jQuery

I am using jQuery to try and trigger a method when a ASP.Net (2.0) dropdown list's change event is handled by jQuery. The problem is that the drop down list is located inside a gridview and even then only when a user has decided to edit a row within that gridview. I think I have it picking up the object using a ASP code block but the p...

ASP.Net Client Events on DropDownList?

Is there a client event that I can use for when a DropDownList's data has been loaded/bound onto the control? I need to trigger event on their side when this happens. ...

DropDownList with LinqDataSource and an empty option

Is there some elegant way to add an empty option to a DropDownList bound with a LinqDataSource? ...

Forms - Dropdownlist

How to design a dropdown list that can have multiple selections using checkboxes. Can we do it using html/css or it requires javascript? For a visual clarity you can have a look at the image I have attached.image link ...

How can I set the value of a DropDownList using jQuery?

As the question says, how do I set the value of a DropDownList control using jQuery? ...

How can a hashtable be bound to a drop down list?

In vb.net / winforms, how can a hashtable be bound to a drop down list or any other datasource-driven control? ...

DropdownList Setting Default Value

How should i get a value displayed in the dropdownlist when redirected through a cancel buttton.The value in the page where cancel button is there in a textbox should be cought in the dropdownlist. This dropdownlist is having selectedindexchanged event also fired for which on selection of a country in the list we get a listview displaye...

Dropdownlist to Filter GridView

I have tried different examples to filter a gridview by dropdownlist, but is it possible in a button on_click event? Do i create something like a SelectedItem on each dropdown and have them added to the button event? Sorry to be so vague....I would like to have the dropdowns with a selectedvalue and then add them together to perform a ...

DropDownList.SelectedValue changes (as a child control in a FormView) aren't sticking

Okay, I have a FormView with a couple of child controls in an InsertItemTemplate. One of them is a DropDownList, called DdlAssigned. I reference it in the Page's OnLoad method like so: protected void Page_Load(object sender, EventArgs e) { ((DropDownList)FrmAdd.FindControl("DdlAssigned")).SelectedValue = ((Guid)Membership....

DropdownList.selectedIndex always 0 (yes, I do have !isPostBack)

(Scroll down to bottom of post to find solution.) Got a asp.net page which contains a Datalist. Inside this datalist, there is a template containing a dropdownlist and each time the datalist is filled with an item, a ItemCreatedCommand is called. The itemCreatedCommand is responsible for databinding the dropdownlist. I think the prob...

Access DropDownList.SelectedIndex in DataList.ItemCreatedCommand (EventBubbling or other solutions)

How am I to bubble the event caused when itemIndex is changed in a dropdownlist - so that I can use the itemindex-value in my ItemCreatedCommand-function? A solution is found at: http://209.85.129.132/search?q=cache:cYDzeE8Swf0J:authors.aspalliance.com/hmcheung/Articles/030331/Default.aspx+dropdownlist+datalist+selectedindex&amp;hl=no&...

Select a ListItem from DropDownList using a Linq Query

I' trying to use a Linq query to find and set the selected value in a drop down list control. Dim qry = From i In ddlOutcome.Items _ Where i.Text.Contains(value) Dim selectedItem As ListItem = qry.First ddlOutcome.SelectedValue = selectedItem.Value Even though the documentation says that the DropDownList.Items collect...

How do I add options to a DropDownList using jQuery?

As the question says, how do I add a new option to a DropDownList using jQuery? Thanks ...

DataBound DropDownList in DataGrid - order of binding

I have a DataGrid that looks like this (slightly simplified here): <asp:DataGrid ID="grdQuotas" runat="server" AutoGenerateColumns="False"> <HeaderStyle CssClass="quotas-header" /> <Columns> <asp:TemplateColumn> <HeaderTemplate> Max order level</HeaderTemplate> <ItemTemplate> ...