473,396 Members | 1,707 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,396 software developers and data experts.

Populating multiple dropdowns

What I want to do is to populate multiple dropdowns when editing.
Presumably...
a) I should use a DataReader so that I can get each ResultSet for each
dropdown control, and that should cut down round trips to the server.
b) I should populate these dropdowns in the DataGrid_EditCommand?
What I am having problems with is actually referencing the dropdowns on the
template.
e.g. I have a dropdown called drpAccessLevels, but I cannot find this
anywhere.
Where am I going wrong?

Many thanks in advance.
Andy
Nov 19 '05 #1
1 1450
> a) I should use a DataReader so that I can get each ResultSet for each
dropdown control, and that should cut down round trips to the server.
Only as long as you're building a batch SQL statement (like "select * from
foo; select * from bar") and not calling ExecuteReader twice. Each ExecuteReader
makes a trip to the DB.
b) I should populate these dropdowns in the DataGrid_EditCommand?
What I am having problems with is actually referencing the dropdowns
on the
template.
e.g. I have a dropdown called drpAccessLevels, but I cannot find this
anywhere.


Typically you'd do any additional modifications of the row in ItemDataBound
event off the grid. So then when the DataGridItemEventArgs.Item.ItemType
== ListItemType.EditItem then you know you're working with the editable row.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #2

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

Similar topics

7
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
11
by: lduperval | last post by:
Hi, I`m trying to do date calculations in three types of time zones: local, GMT and specified. The issue I am facing is that I need to be able to specify a date in the proper time zone, and I`m...
0
by: Pat Patterson | last post by:
I'm having serious issues with a page I'm developing. I just need some simple help, and was hoping someone might be able to help me out in here. I have a form, that consists of 3 pages of...
3
by: Damon | last post by:
I am working on a site in which I would like to have two dropdowns that will allow a user to navigate through the administrative pages of the site. The first would allow the user to choose the...
1
by: Paul D. Fox | last post by:
I'd like to populate four dropdowns using code behind. Each dropdown contains the same list. How can I populate them using a subroutine. Something like: InitializeDropDownList(ddlQuadrant1)...
2
by: Anup | last post by:
In my application there are many inter-dependent dropdowns. ie:- when user select value form dropdown1 according to that a query is fired and the data is populated in dropdown2 by applying the...
0
by: JAW1971 | last post by:
Hi I have two drop downs and abutton, the button is supposed to send one of the items from one of the dropdowns to a qry (access database) and populate the datagrid with the info. It is not working...
0
by: koonda | last post by:
Hi all, I have a Project due after one week. It is a web service project. I have a Web Form which communicates to the web service and this web service communicates to the database. I have all my...
2
by: Shikha1234 | last post by:
Hi, I have two dropdowns. I want that the DDL2 gets populated based on the values in DDL1. How can I achieve that. This is the way I am populating DDL1 string cmd = "Select *...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.