eramgarden Posted May 6, 2004 Posted May 6, 2004 I have a Repeater with checkbox and a textbox. All is fine, databinds, i can click the checkbox etc.. I want to add a dropdowlist . I found an exmaple on 4guys about adding a dropdownlist to DataGrid and that works fine in a datagrid. I used the same example in Repeater but I get an error when code tries to bind to Repeater. This is what I have: <asp:repeater id="rpAct" runat="server"> <HeaderTemplate> ... </HeaderTemplate> <ItemTemplate> ... <td><asp:DropDownList id="ddlActTypes" DataValueField="code_id" DataTextField="code_desc" DataSource="<%# GetActList() %>" SelectedIndex='<%# GetSelActIndex(Container.DataItem("code_id")) %>' Visible="true" runat="server"> </asp:DropDownList> </td> ... I have a routine to for GetActList and GetSelActIndex. Those work too But the Error happens when I Bind: rpAct.Databind() with this error 'System.Data.DataRowView' does not contain a property with the name code_desc I'm open to suggestions if there's another way of doing this Quote
Administrators PlausiblyDamp Posted May 6, 2004 Administrators Posted May 6, 2004 Does your datasource contain a column called code_desc? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
eramgarden Posted May 6, 2004 Author Posted May 6, 2004 Yes, it does. I cant find exmple of Repeater and dropdownlist.I'm sure it's doable.. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.