dropdownlist

ASP.Net GridView with Dropdown List

Hi, As my previous question didn't seem to have much popularity, I decided to change completely the way I approached the problem. Now my issue is that I still have TABLE1 with a foreign key FK, but what I want to do now is have the FK column in the GridView display Dropdown Lists. The Dropdown Lists should have their Text property bound...

Set dropdownlist in gridview in rowediting event

Trying to get the findcontrol to work so I can set the default value of the dropdownlist I have in a template field, but I'm having no luck. Am I doing something wrong? Dim drdList As DropDownList For Each row As GridViewRow In gridviewComputer.Rows drdList = gridviewComputer.Rows(e.NewEditIndex).FindControl("statusDropDown...

Populating dropdownlist client side. Getting post back validation error.

I have a webcontrol with two dropdownlists on in. When you choose something from the first, the second is populated accordingly. When post back occurs I get the old: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security...

Flex DropdownList does not show the correct values

Hi All I have a Flex Spark dropdownList in which I need to show the Provider FirstName,LastName: <s:DropDownList id="providerList" dataProvider="{model.practiceProviderList.practiceProviders}" labelField="provider.providerName.firstName"/> But the output shows only [object Object] & [object Object] as there are 2 p...

How to manipulate form data before sending to server?

Hi, I want to collect 25 schedule times (hour and minutes). User will input 25 times using drop down boxes. That means, 25 hour and 25 minutes drop down boxes, making total 50 drop down boxes. But I don't need to send them as individual variables. One string like- 08:05;08:37;09:43;09:59:11:12;12:34 will do. So, the variable to send wil...

Flex DropdownList CreationComplete error

Hi All I have a DropdownList that shows a list of providers & the Provider associated with that Patient must be selected. The Dropdown list: <s:DropDownList id="providerList" width="80%" fontSize="12" fontWeight="bold" selectionColor="white" creationComplete="providerList_creationCompleteHandler...

best way design Country(City) select list and store current country(city) in asp.net mvc

I have asp.net mvc app. In header on all pages I have dropdownlist with list cities. Content on pages show with depend what city is select. I want show selected once city on every page and want save and restore this city from cookie when browser is close. What the best solution for this? ...

Dynamically add item to DropDownList??

I have an Edit page in my application that contains a DropDownList. This DDL is bound to an EntityDataSource that only shows the active "ProjectManagers". In the case where the user is editing a record that is assigned to an "inactive" ProjectManger, an ArgumentOutOfRange Exception is (rightfully) thrown by the DDL (because that Item w...

no value for SelectedValue on a DropDownList control on PostBack

I'm really stumped. I have an ASP.NET page (VS 2008, .NET 3.5/SP1) that contains a gridview and below that a few textboxes and a dropdownlist that the user can use to add a record to the gridview. So, i fill out my form, click my submit button, and I can get the values of the textboxes easily enough, but the dropdownlist.SelectedValue ...

Disabling viewstate on drop down list causes problems

Hi, I have a page that has two drop down lists on it and a button. All controls sit in an update panel. The first drop down list (ddl1) contains a lot of values which caused a huge viewstate so I disabled viewstate on it. In the page oninit event I populate the drop down list every time the page is posted back. This all seems to work ...

Disable drop down box on radio button click

Hi, I have two radio buttons and a drop down box as you can see below. What I want to do is: 1. While no is checked, either hide, or grey out the drop down box, and 2. While yes is checked, show the drop down box. Any pointers would be appreciated! <td colspan="4"> <input name="discount" type="radio" id="Yes" value="Yes" />Yes <input ...

data grid bound with dropdown list

How do I dynamically change the content of a data grid to select the correct data from database when the drop down list SelectedIndexChanged event happens? To be more specific, I have a dropdown list of apple, orange and pearl. When the dropdown list changes from apple to orange, I want the datagrid to query the database like this "sel...

Help with javascript to hide radio buttons

Hi guys, I got this code on here recently <script type='text/javascript'> $('#discountselection').hide(); $('#No').click(function(){ $('#discountselection').hide(); }); $('#Yes').click(function(){ $('#discountselection').show(); }); </script> The aim being to hide a drop down box depending on wheth...

javascript drop down loop if statement

I have created 2 drop down menus, from and to, these include times starting from 8 > 22:00, however on submitting the form it is asking me to select a start time which has already been selected and confirmed by an alert option i have included, has really confused me!! any help appreciated. craig window.status='Loading contingency scrip...

I can't use HTML select within Dojo Tooltip.

I need a Dojo tooltip with a drop-down-list. Unfortunately the tooltip closes when the cursor is moved over the drop-down-list, because the list overhangs the tooltip's div. Is there any workaround? Could the close-automatism be disabled temporarily? <div class="dojoPopupContainer dojoTooltip showComboBox" style="position: abso...

SelectList -> how do I find the SelectedItem.Text ?

There are times where I would like to take the SelectedList and ask for the Text item that has been selected. So using the example: SelectList sl = new SelectList( new[]{ new SelectListItem{ Text="one", Value="1"}, new SelectListItem{ Text="two", Value="2"}, new SelectListItem{ Text="three", Value="3"} }, "Text", "Value", "2" ); ...

Handle drop down list sizes IE & FireFox

On my web page, I have a drop down list ( with ); I have provided width to it. The contents of the list are populated dynamically hence I can't provide a maximum size. If I don't specify the size then the list is displayed properly but then the alignment of neighboring components gets disturbed as list takes width of the widest option in...

ASP.NET - reload a dropdown?

Hello, I have a dropdown which shows filesnames and when the index is changed, the slected file is offered for download. I also have a button which creates new files ... now after a new file was created, the new filename should also be shown in the dropdown. It works fine, when I refresh the page, but this is not what I want. I tried p...

ASP.NET MVC: Cities list and store selected city in cookie

I have list of cities on my site, this list placed in Site.Master and look like: <a id="<%= selectedCity.CityId %>"><%= selectedCity.Name %></a> <ul> ... <li id="<%= city.CityId %>" > <%= Html.ActionLink(city.Name,"ChangeCity",new{ newCityId = city.CityId })%> </li> ... </ul> Next, all my controller are based from ...

Populating Dropdownlist Using MVC2 Based On Another Dropdownlist (Cascading DropDownList)

I am making an application that deals with vehicles. I need two DropDownLists: Makes: All Vehicle Makes Models: Models that belong to the selected value of the Make DropDownList How is this done in MVC2? My Idea: Do I use an ajax call when my first list is selected and then pull back the Models to bind to the Model DDL? How woul...