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

D

D. Shane Fowlkes

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!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top