D
Darren Clark
Is it possible to nest a drop down list in a repeater? (also the repeater has a nested repeater)
The code i am using looks like.... i get an error saying that
Exception Details: System.Web.HttpException: DataBinder.Eval: 'System.Data.DataRow' does not contain a property with the name topic.
If i remove the dropdown list code it works fine...
Any ideas?
<asp:Repeater ID="SectionRepeater" Runat="server">
<ItemTemplate>
<div>
<p class="section_text"><%# DataBinder.Eval(Container,"DataItem."+ JR.Core.Data.QuestionData.FLD_SECTION_NAME) %>
<aspropDownList ID="SectionDropDown" DataSource='<%# ((DataRowView)Container.DataItem).Row.GetChildRows("myquestions") %>'
DataValueField="ques_id" DataTextField="topic" Runat=server></aspropDownList>
</p>
<!-- start child repeater -->
<asp:repeater id="QuestionsForSections" datasource='<%# ((DataRowView)Container.DataItem).Row.GetChildRows("myquestions") %>' runat="server">
<itemtemplate>
<span class="question_text">
<%# DataBinder.Eval(Container.DataItem, "[\"topic\"]")%>
</span><br>
<span class="body_text">
<%# DataBinder.Eval(Container.DataItem, "[\"body\"]")%>
</span>
<br>
<br>
</itemtemplate>
</asp:repeater>
<!-- end child repeater -->
</div>
</ItemTemplate>
</asp:Repeater>
The code i am using looks like.... i get an error saying that
Exception Details: System.Web.HttpException: DataBinder.Eval: 'System.Data.DataRow' does not contain a property with the name topic.
If i remove the dropdown list code it works fine...
Any ideas?
<asp:Repeater ID="SectionRepeater" Runat="server">
<ItemTemplate>
<div>
<p class="section_text"><%# DataBinder.Eval(Container,"DataItem."+ JR.Core.Data.QuestionData.FLD_SECTION_NAME) %>
<aspropDownList ID="SectionDropDown" DataSource='<%# ((DataRowView)Container.DataItem).Row.GetChildRows("myquestions") %>'
DataValueField="ques_id" DataTextField="topic" Runat=server></aspropDownList>
</p>
<!-- start child repeater -->
<asp:repeater id="QuestionsForSections" datasource='<%# ((DataRowView)Container.DataItem).Row.GetChildRows("myquestions") %>' runat="server">
<itemtemplate>
<span class="question_text">
<%# DataBinder.Eval(Container.DataItem, "[\"topic\"]")%>
</span><br>
<span class="body_text">
<%# DataBinder.Eval(Container.DataItem, "[\"body\"]")%>
</span>
<br>
<br>
</itemtemplate>
</asp:repeater>
<!-- end child repeater -->
</div>
</ItemTemplate>
</asp:Repeater>