471,356 Members | 1,636 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Dropdownlist as a pick list - setting the selected item

Is there any way to set the item in a dropdownlist to correspond to a value
from data? I have a number of dropdownlist controls within a detailview
control. The detailview control represents 1 record and I have ddl controls
populated from lookup tables. What I want to do is to set the selected item
in the ddl to correspond with that in the detailview. I am extremely
frustrated at the lack of documentation available on how this can be
achieved. I have been trying various methods to achieve it without
success...can anybody help? I have attempted the following:

selectedindex='<%# databinder.Eval(Container, "DataItem.Status")%>

but that sets the selected index to the status_id rather than to the datavalue
Jul 21 '05 #1
0 996

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Northern | last post: by
1 post views Thread by Aaron Prohaska | last post: by
7 posts views Thread by Lastie | last post: by
1 post views Thread by clickon | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.