<asp:GridView ID="grdEmployees" runat="server" AutoGenerateColumns="False" //lots of grid style stuff here DataSourceID="dsEmployees" AllowPaging="True" PageSize="20"> <Columns> <asp:BoundField DataField="displayname" HeaderText="Name" /> <asp:TemplateField HeaderText="Access Level"> <ItemTemplate> <asp:DropDownList ID="cboAccess" runat="server" SelectedValue='<%# Eval("access_level") %>'> </asp:DropDownList> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> <asp:ObjectDataSource ID="dsEmployees" runat="server" SelectMethod="getAllEmployees" TypeName="servd.DataAccessLayer" />The data as you see comes from a Data Access Layer (3-Tier). The problem I'm having is that I can't bind the dropdown.
Eval("access_level")
:'cboAccess' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
Evidently it does not see the colunn named "access_level"
in the DataSet.