dropdownlist

concatenating results from SQL query and NULL columns

I need to concatenate several columns of a table into a single value, then show that value in an asp dropdownlist. The SQL code I'm issuing is as follows: SELECT UserID, CustomerNum, UserName + ' - ' + UserAddress + ',' + UserCity + ' ' + UserState AS UserInfo FROM Users WHERE (CustomerNum = @CustomerNum) ORDER BY Use...

ruby search drop down

I have a drop down list of Type in my Products model. I want to be able to search in the Products index.html.erb so a user selects a type from a drop down list, clicks search and all the products matching that type are returned. I can get normal search methods working where the user enters in their search in a text box but I cannot get ...

Disable second dropdown menu before first is populated

I need to grey out the second jump box (Select a Subcategory) before the first (Choose a Category) has a valid selection ..Here is the current code.. thanks guys <script type="text/javascript"> \$j(document).ready(function() { \$j('.subf_dropdown').html($j('.subf_dropdown').html()); }); function chooseForum(f, name) { \$j....

Something like oEvent.cancelPostBack for DropDownList in asp.net server side code

Hi, I am having the code for selectedIndexChanged event of a DropDownList in Asp.Net that looks somewhat like this protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { //Get the value of Base category on the basis of the new index selected. if(BaseCategory belongs to (SomeValues)) { //do some actio...

SelectedValue on html drop down list in MVC

I am new to MVC, so sorry if I am being a bit thick. I am using VB I am trying to fill an html drop down list using data from a db, but the first item is always selected, no matter what. What am I doing wrong? Here is my code - In the controller: ViewData("MatchTypeList") = New SelectList(_db.GetMatchTypes.ToList(), "MatchTypeID", "...

Absolute positioning error in IE6 with dropdown list

I have a div, that I'm using JavaScript to position, so that when someone hovers over an image, it displays a tooltip message that follows along with the pointer. (Using tooltip-0.2.js ) The problem is that when a user goes to the page in IE6, a disabled dropdown box on the page is showing through this absolutely positioned tooltip whe...

how can i have a working dropdownlist with links from a csv in php

I have a website that loads a CSV, divides it into parts, and shows these parts. There are 7 parts, and since it is for a music store it is sliced like this: the name of the product the subname the price the stock in one shop the stock of the other shop the group name the brandname What i have now is that it shows 12 products on 1 p...

Set dropdownlist item text using server side method

I am trying to set the Text property of a drop down list option like this: <asp:ListItem Value="AB" Text='<%= Resources.Get("USA") %>'></asp:ListItem> But it isn't working, instead the Text value is literally <%= Resources.Get("USA") %> and not the string "USA". i.e. it is not being interpreted as code. What is the problem? ...

Asp.Net - DropDownList.DataValueField in a IList

In Asp.Net 3.5, it is possible that the DataValueField is a IList ? myddl.DataValueField = "ListOfId" where ListOfId as a IList in my DataSource ...

Dependent Dropdown inside Joomla

I was trying to implement the Ajax method for deploying dependent drop down select boxes inside Joomla. The Problem is that if you call an ajaxRequest to run a php with the query that populates the second drop down depending on the result of the first, this is out of the joomla framework and you can't use anything from the joomla functio...

How to programmatically set the dropped control rect of a CComboBox

How to programmatically set the dropped control rect of a CComboBox? I know I can do this in the resource editor, but how do I change it, or set it if I programmatically create a combo box? I can acquire this information via the CB_GETDROPPEDCONTROLRECT message, but I don't see a corresponding set message/function. ...

Refreshing a single component in a JSP page

Can I refresh a HTML component in JSP? I have two dropdowns. On selection of a value in the first dropdown the values in the dropdown box are to be fetched from the database. Is this possible using JSP? ...

how to get the selected value of dropdown list of asp.net and store in session variable?

Dim ename As String = DropDownList.SelectedItem.Value this statement is'nt working any help is appreciated!! ...

Insert newline between the items of dropdownlist

Hi All, I want give some space between the items of the dropdownlist. is it possible? ex: ddl: item1 item2 item3 ...

ASP.NET MVC DropDownList Validation

Hello everybody, I have [DisplayName("Country")] public List<SelectListItem> Countries { get; set; } property in strong-type Model View class for DropDownList. When I try to check if the ModelState.IsValid on form postback it's always false & error for Countries tells "Can't convert [value] to SelectListItem" or some of a kind. I...

Get selected Value from dropdownlist after submit?

I populate DropDownList in ASP.NET webforms: <asp:DropDownList runat="server" ID="salesman"></asp:DropDownList> users= Buslayer.GetSalesRep(); foreach (userentity user in users) { salesman.Items.Add(new ListItem(user.FirstName + " " + user.LastName, user.UserID.ToString())); } A...

Honor Whitespace padding to display columns in fixed width <select>

I am trying to create the effect of columns in a dropdown by padding text with whitespace as in this example: <select style="font-family: courier;"> <option value="1">[Aux1+1] [*] [Aux1+1] [@Tn=PP] </option> <option value="2">[Main] [*] [Main Apples Oranges] [@Fu=$p] </option> <option value="3">[Main] [*] [Next NP] ...

Dropdownlists creates postback on key changes in IE

I have created a label and a dropdownlist. The label has the dropdownlist as associated id. If I click on the label and then uses the mouse up or down the dropdownlist creates a postback for each click. This is quite anoying and doesn't happen if you click on the dropdownlist and uses key-up or key-down, or if you uses another browser th...

ASP.NET dropdown selected value?

I've an ASP.NET dropdown list and getting selected value by using the .SelectedValue. I also set this value in some cases by assigning to it. I seem to be randomly not getting this value set even when I choose the item from the drop down. Sometimes it works and sometimes it doesn't. Ideas? ...

cakephp droplist/form - xml and ajax

Hello- I'm complete noob in Cakephp - here goes... I have a website set up with Cakephp framework. I would like to create two dropdown forms to compare/show data. When the user selects an item from the dropdown from either one of the forms it is to show the content below on website. I was thinking this data would need to be stored in ...