473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Program Sees One DropDownList and Ignores Another

Assume a DataGrid that, during edit mode, has two DropDownMenus, ddlA
and ddlB. Upon clicking 'Save,' the app performs the simplified task
of copying the DDL values of each to a label.

public void roleList_Update(Object sender, DataGridCommandEventArgs e)
{
// VARIABLES --------------
DropDownList ddlA = (DropDownList) e.Item.FindControl("ddlAEdit");
DropDownList ddlB = (DropDownList) e.Item.FindControl("ddlBEdit");
// ------------------------

Label1.Text = ddlA.SelectedValue + " " + ddlB.SelectedValue;
}

The output of Label1 will be 'X ', where X is the correct value from
ddlA -- ddlB's value is missing.

ddlB at least exists; were it not found, the app wouldn't operate at
all. Other quick checks confirm that the program recognises ddlB.
Despite this, it fails to see a SelectedItem there, while it reads the
same thing normally from its neighbour!

Thanks.
Jan 15 '08 #1
0 968

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: alphatan | last post by:
Is there relative source or document for this purpose? I've searched the index of "Mastering Regular Expression", but cannot get the useful information for C. Thanks in advanced. -- Learning...
16
by: alakesh.haloi | last post by:
Hi All Is there a limit on the number of register variables that can be declared and initialized in a C program on a particular hardware platform? If you define more number of register variables...
2
by: Newbie | last post by:
I have a C# asp.net webform that contains a dropdownlist and a button that allows the user to select another item in the dropdownlist. The webform should work as follows: When the user selects...
1
by: Marius | last post by:
Hi all, I need an asp:dropdownlist on a webform that is databound to a dataset. This works fine and returns the data to populate my dropdownlist. In the DB I only have valid data, but I need a...
10
by: Sacha Korell | last post by:
I'm trying to load a drop-down list with all DropDownList control names from another page. How would I be able to find those DropDownList controls? The FindControl method will only find a...
0
by: Kimberly Walker | last post by:
Im farily new to the .Net so please bear with me. I have several dropdownlist that is bound to a sql string. For example dim sqlstring as string="Select books from SuborgT where books=New" I...
1
by: MaryamSh | last post by:
Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button...
0
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I...
2
by: Trih | last post by:
Hello, I'm writing a .Net 2.0 web application in C# and I have a strange problem with something as simple as a dropdownlist. As a test I have added a single dropdownlist to an empty web page...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.