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

Trying to get DataList to use a DropDownList in EditMode. Stuck!

My problem is pretty straight forward and I conceptually understand what I'm
doing wrong. I'm trying to populate a DDL that doesn't exist. I;m just not
sure how to resolve it.

I have a DataList that allows for record editing and deleting using the
OnEditCommand and OnDeleteCommand methods. Easy enough. One of the fields
in my datalist is a key to a record in another table. So when editing,
instead of seeing a integer value for the user to edit (and they have to no
idea what the keys mean...only the string lables), I would like to place a
DDL in this field during edit mode. Therefore, the user can just select a
new item from the DDL and the VALUE of the DDL gets updated into the table.
Easy concept. I just can't seem to get it to work and the best way I can
descript the error is that the aspx is expecting me to "declare" the DDL
even when it's no needed.

Here...take a look. (THANKS!) I would GREATLY appreciate it if someone could
tell me what code to use and where. I posted help last week on an online
forum but only got generic responses like "Use FindControl".

This is just a stripped down model of what I'm trying to accomplish. The
concept is the same....but this is just a demo.
Broken page: http://www.drpt.virginia.gov/ddltest.aspx

Exact Source Code: http://www.drpt.virginia.gov/ddltest.htm

Sample tables: http://www.drpt.virginia.gov/Temp-People-tables.XLS

Thanks!!

Nov 19 '05 #1
3 1270
Hi,

Just declare the DDL as a protected member in the code behind.

Something like:

protected dim ddlStatus as DropDownList.
HIH
--
Cheers,
Gaurav Vaish
http://www.mastergaurav.org
http://mastergaurav.blogspot.com
--------------------------------

Nov 19 '05 #2
Where would I declare this??

"MasterGaurav" <ga**********@gmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Hi,

Just declare the DDL as a protected member in the code behind.

Something like:

protected dim ddlStatus as DropDownList.
HIH
--
Cheers,
Gaurav Vaish
http://www.mastergaurav.org
http://mastergaurav.blogspot.com
--------------------------------

Nov 19 '05 #3
In the class associated with the codebehind of the aspx file.

I think it will be in the file ddltest.aspx.vb

--
Cheers,
Gaurav Vaish
http://www.mastergaurav.org
http://mastergaurav.blogspot.com
--------------------------------

Nov 19 '05 #4

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

Similar topics

2
by: Antonio D'Ottavio | last post by:
Good Morning, In my web page I've a datalist that is sourced by a database, the problem is that I want that one of the column of the datalist contain a dropdownbox that also is sourced by a table...
5
by: Ian O'Rourke | last post by:
I'm a bit confused by the datalist. I can put an item in the datalist in editmode by the following dtlBooks.EditItemIndex = e.Item.ItemInde BindBooks( This works great, the problem is when I...
2
by: Shiju Poyilil | last post by:
Hi ! I have a requirement wherein i am binding a datalist which contains a label (Caption for the field) and some literal hidden fields and a dropdown list. When I am binding to the datalist.....
2
by: Olav Tollefsen | last post by:
I have a Web Form with a DataList. Inside the ItemTemplate, I have a DropDownList control. <asp:DataList ID="ProductDataList" Runat="server"> <ItemTemplate> <asp:DropDownList ID="DropDownList1"...
1
by: Paul L | last post by:
Hi, I have an issue with the OnSelectedIndexChanged event not firing for a DropDownList control which is in the ItemTemplate of a DataList. I have made an exact copy of the DropDownList control,...
0
by: bryanp10 | last post by:
I have a DataList on my page which contains multiple DropDownLists. My page defaults to showing six rows in the DataList. I want the ability to dynamically add rows if needed. Right now I'm just...
4
by: Chris Kettenbach | last post by:
Good morning all, I am sure this has been asked but I did not see anything. I have a datalist control. In the edititemtemplate I have a dropdownlist. I know on the itemdatabound event is where I...
0
by: Dan | last post by:
Hi, I have a detailsview with two fields: in editmode, one is a textbox and the other is a dropdownlist. i want to update both fields using the detailsview. My problem: when clicking on the...
3
by: Crazy Cat | last post by:
Hi all, I am developing an asp.net 2.0 application in Visual Studio 2005. On my page I have a simple datalist that is bound programmatically to a collection of simple objects. On this page I...
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...
1
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)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.