I have an asp:listview bound to sqldatasourceA. In my edititemtemplate, I have a dropdownlist bound to sqldatasourceB. This listview shows users and the group they belong to, and when they go to edit a user, I want to populate the dropdownlist with all of the groups, then select the one they are currently assigned to. However, I can't figure out how to get the dropdownlist to select the current group. I've tried 'SelectedValue='<%# Bind ("...") %>, but that doesn't seem to work.
Just to clarify:
[Table Users] id name groupid
[Table groups] id name
I'm showing users in a listview, and when they go to edit, I want to populate a ddl with all groups, then select the one currently assigned.
Any ideas?