Hi,
i am new to Telerik controls. i am in a situation where i need to bind a NestedViewTemplate with a datasource having values from different tables connected with an id of an item within a RadGrid.
what i want to do is to bind that nested view template by getting value of id from its RadGrid using a datasource.
i have tried many option but didnt find any luck. is there anyway to bind its datasource from code behind as we do with RadGrid (as radgrid.datasource="any datasource").
is there any way to do that
<asp:EntityDataSource ID="EDSPrePostConfig" runat="server" ConnectionString="name=AdminPortalDBEntities"
DefaultContainerName="AdminPortalDBEntities" EntitySetName="PrePostConfigurations"
Select="PrePostCourseActivities.[CourseName] as PreLearning,
PrePostConfiguration.[Duration] as Duration
from (PrePostConfiguration
join LearningMatrix on PrePostConfiguration.[BaseCourseId] = LearningMatrix.[Id]
join PrePostCourseActivities on PrePostConfiguration.[PrePostCourseActivityId] = PrePostCourseActivities.[Id]
join PrePostType on PrePostConfiguration.[PrePostTypeId] = PrePostType.[Id])" Where="PrePostConfigurations.[Id] = @Id">
<WhereParameters>
<asp:Parameter Name="Id" Type="Int32"/>
</WhereParameters>
</asp:EntityDataSource>
<NestedViewSettings DataSourceID="EDSPrePostConfig">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="Id" MasterKeyField="Id" />
</ParentTableRelation>
</NestedViewSettings>
<NestedViewTemplate>
<asp:Panel ID="NestedViewPanel" runat="server" CssClass="viewWrap" BorderColor="#3366FF" BorderWidth="3px">
<div class="contactWrap">
<table width="90%">
<tbody>
<tr>
<td><b>Pre-Learning Configurations:</b> </td>
<td></td>
</tr>
<tr>
<td width="100">Pre-Learning: </td>
<td><%#Eval("PreLearning") %></td>
<td width="100">Duration: </td>
<td><%#Eval("Duration") %></td>
</tr>
<tr>
<td>Required: </td>
<td><%#Eval("Required") %></td>
<td>Feedback URL: </td>
<td><%#Eval("PreFeedbackURL") %></td>
</tr>
</tbody>
</table>
</div>
</asp:Panel>
</NestedViewTemplate>
it would be great if someone can help me with this.
Thanks and BR
JK
i am new to Telerik controls. i am in a situation where i need to bind a NestedViewTemplate with a datasource having values from different tables connected with an id of an item within a RadGrid.
what i want to do is to bind that nested view template by getting value of id from its RadGrid using a datasource.
i have tried many option but didnt find any luck. is there anyway to bind its datasource from code behind as we do with RadGrid (as radgrid.datasource="any datasource").
is there any way to do that
<asp:EntityDataSource ID="EDSPrePostConfig" runat="server" ConnectionString="name=AdminPortalDBEntities"
DefaultContainerName="AdminPortalDBEntities" EntitySetName="PrePostConfigurations"
Select="PrePostCourseActivities.[CourseName] as PreLearning,
PrePostConfiguration.[Duration] as Duration
from (PrePostConfiguration
join LearningMatrix on PrePostConfiguration.[BaseCourseId] = LearningMatrix.[Id]
join PrePostCourseActivities on PrePostConfiguration.[PrePostCourseActivityId] = PrePostCourseActivities.[Id]
join PrePostType on PrePostConfiguration.[PrePostTypeId] = PrePostType.[Id])" Where="PrePostConfigurations.[Id] = @Id">
<WhereParameters>
<asp:Parameter Name="Id" Type="Int32"/>
</WhereParameters>
</asp:EntityDataSource>
<NestedViewSettings DataSourceID="EDSPrePostConfig">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="Id" MasterKeyField="Id" />
</ParentTableRelation>
</NestedViewSettings>
<NestedViewTemplate>
<asp:Panel ID="NestedViewPanel" runat="server" CssClass="viewWrap" BorderColor="#3366FF" BorderWidth="3px">
<div class="contactWrap">
<table width="90%">
<tbody>
<tr>
<td><b>Pre-Learning Configurations:</b> </td>
<td></td>
</tr>
<tr>
<td width="100">Pre-Learning: </td>
<td><%#Eval("PreLearning") %></td>
<td width="100">Duration: </td>
<td><%#Eval("Duration") %></td>
</tr>
<tr>
<td>Required: </td>
<td><%#Eval("Required") %></td>
<td>Feedback URL: </td>
<td><%#Eval("PreFeedbackURL") %></td>
</tr>
</tbody>
</table>
</div>
</asp:Panel>
</NestedViewTemplate>
it would be great if someone can help me with this.
Thanks and BR
JK