dropdownlist

DataGridViewComboBoxCell in an unbound DataGridView WinForm control

I am new to the DataGridView WinForm control and just do not like data Binding. I Used to use Spread OCX back 100 years ago and found it friendly. Now I am running into a problem try to do something simple: I have a grid with two columns: 1) Name 2) Status I want to loop through my collection of "ChinaVisas" and display the applicant's...

Populate DropDownList from DataSource (ASP.NET)

I have an SQL Data Source which selects all rows of a table. I need to populate a dropdownlist with a certain field ('percentage') of all the rows, and when one is clicked to make the 'value' the rows 'id' field. Is there a simple way of doing this? Thanks ...

Retrieving DropDownList 'value' (C#/ASP.NET)

On my page, whenever a DetailsView is updated, I must audit the changes into a database. On most pages this works perfect, as there were just textboxes - however on a page I am working on right now, with dropdownlists, my code isn't working. Basically, what the code does is captures the Updating event of the SqlDataSource, creates a dat...

RaisePostDataChangedEvent not called after returning true from LoadPostData

I have derived my own class ControlStateDropDownList which extends DropDownList. As its name suggests, its purpose is to use the ControlState instead of the ViewState to store the SelectedIndex. AutoPostBack is set to true. This is a requirement because this derived DropDownList needs to be inside an ASPxGridView column, and the ASPxGri...

set value of dropdown lists in Gridview with javascript

I have a dropdownlist and a gridview with a drop down list in every row. I have removed other cols in Grid for simplicity. Whenever a new value in the dropdownlist is selected I would like to set all of the dropdownlists in the gridview to that same value via javascript. (Yea both the dropdownlist outside the gird and the ones inside t...

Reportings services + drop down list length + different user'r rights

Hi, I have some report and plenty of parameters inside that report. One of parameter contains values stored inside dropdown list (that are downloaded from db). I wanted to set the custom width for a specific drop down list in my report so I do it by adding the following code in Report.aspx file located in: C:\Program Files\Microsoft SQL ...

Binded DropDownList with ToolTip

Hi I have a DropDownList bounded from the code behind. How can I use the DataTextField as a ToolTip of the DropDownList? DropDownList list = this.DropDownList1; list.DataSource = GetData(); list.DataTextField = "DisplayString"; list.DataValueField = "DataValue"; list.DataBind(); I want the bounded Field DisplayString to bounded also ...

how to remove cache on client system when he press back button in firefox

In a page i show the dropdownlist. the value of this is set by server side code. i have a problem with it:- when user press on link he goes to 2page and he come back then value need to be change becuase on 2nd page user already edit them. so in chrome he was updated even user press back button but in firefox it is not update the dropd...

how to get an icons in a dropdownlist

Hi. In a dropdown how to get icons along with text and once we select any of the index from the dropdown i want that icon also be selected and to be displayed on that dropdown header ...

why when I pass the selected option in a dropdown to PHP thru AJAX always gives me the first option?

this is my code: comenzar = function(){ document.getElementById('gene').onclick = xmlhttpPost("generador.php"); } xmlhttpPost = function(strURL){ xmlHttpReq = false; self = this; self.xmlHttpReq = new XMLHttpRequest(); self.xmlHttpReq.open('POST', strURL, true); self.xmlHttpReq.setRequestHeader('Content-Type', 'applicati...

Dynamically generating a dropdown using json data?

I have developed a script that receives json data from a php script using $.getJSON. The JSON data looks like '[{"options":"smart_exp"},{"options":"user_intf"},{"options":"blahblah"}] ' <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; <script type="text...

Display the required value in the dropdown on the pageload

I am trying to extract month and year from database and show it as selected in the dropdown. Ex: Month and year, consider 2 and 2013. I want the dropdown expmonth to show Febraury and expyear as 2013 when the page is loaded. When i tried the below code, it did not show me 2 and 2013 instead showed Jan and 2010 which is default. Where do ...

Why is this DropDownList data binding to a List<String> not working?

I'm trying to bind a List<String> to a DropDownList in a user control. I think I'm doing the right thing, but it seems that after my code executes the bindings are cleared. Here's the code for review! User control: <asp:DropDownList ID="subjectNameDropDown" runat="server"/> <asp:DropDownList ID="yearLevelDropDown" runat="server"/> Au...

asp.net dropdown list tooltip (title) strange behaviour

I have added a "tooltip" to my dropdownlist using the following codebehind: protected void btnAdd_Click(object sender, EventArgs e) { load_Buttons(1); tblAddCandidate.Visible = true; txtAdd_RegDate.Text = DateTime.Today.ToShortDateString(); foreach (ListItem _listItem in this.ddlAssTutAdd.It...

Problems binding data to dropdownlist in MVC

Hi guys, Learning MVC and having major trouble over the last two days trying to bind data from a database to a dropdownlist in MVC. I'm currently following the nerddinner tutorial. I have followed it exactly and somehow still ended up with this error. The ViewData item that has the key 'Dinner.Country' is of type 'System.Strin...

GridView with paging enabled is not filtering based on input from other Controls (DropDownList, TextBox)

Hi guys, Can someone please assist me. I have dynamically created controls onto my page which consists of a GridView, DropDownList, TextBox and Button. I have successfully retrieved data onto the GridView control which then has a paging attribute enabled. Now I am trying to filter data according to the input set by the user through th...

CSS Dropdown Issues

Hey, I am a .NET / Java guy and have to do some website stuff. Complete beginner with CSS etc. I've been working with a template and had to convert the menu to a drop down and have been having loads of difficulty. I've uploaded the current iteration and it can be found here with the barebones menu and css pages: http://www.nitricburns...

Problem setting a property on an Asp.Net custom dropdownlist

I'm trying to set a property on a custom DropDownList: <custom:ReferenceDropDownList ... ValidityDate="<%# Application.CreateDate %>" /> Even though I can see that Application.CreateDate has been set in the Page_Load method on the containing UserControl, the code-behind in the DDL never seems to pick it up. protected override void On...

ASP.Net: How do I disable a ListItem?

Hi there, I've come across an annoying problem that's probably really easy to solve if you're not a newb like myself... I've got a DropDownList in ASP.Net that has a ListItem that requires being disabled... but I DON'T mean Enable="False". And I also don't want to disable the entire DropDownList, just one specific ListItem. What I'm tal...

Get drop down value

How to determine what is selected in the drop down? In Javascript. ...