asp:DropDownList in GridView is only populating the current value
Posted on 2013-05-23
I have a GridView that's populated from a rather large select statement with multiple joins from a couple different databases. Everything is working well and I can update the editable fields using text boxes but I want to edit some of the fields using dropdownlists populated from one of the joined tables in the select statement. I can choose the value and text attributes of the dropdownlist and when I publish the site is only displays the current value in the dropdownlist and doesnt populate the rest of the items in the joined table. I'm not using any code behind to populate the list, just the existing datasource and the asp.net dropdownlist control.
If I create a separate data source and bind that to the dropdown it populates just fine but I don't know how to edit the value of the gridview column doing it that way.
Am I missing something here? I've tried populating it from code behind and haven't been successful in doing so but even then I'm still not sure how to get it update the value in my current gridview.
Any help appreciated!