I'm writing a page which will show a list of artists and a selection of their artworks. In terms of structure it's very much like the demo here: http://demos.telerik.com/aspnet-ajax/listview/examples/datagrouping/defaultcs.aspx
Layout will be:
Artist (name/description/rating)
-- Artwork (title/image/price)
-- Artwork (title/image/price)
-- Artwork (title/image/price)
Artist (name/description/rating)
-- Artwork (title/image/price)
-- Artwork (title/image/price)
-- Artwork (title/image/price)
Artist (name/description/rating)
-- Artwork (title/image/price)
-- Artwork (title/image/price)
-- Artwork (title/image/price)
My SQL query returns all the data on artists and artworks. I can bind this to my RadListView and get the artwork records looking OK by setting them to be the ItemPlaceHolder. But how can I get all the data for each artist such as Name, Description, Rating etc. I cannot understand how to get ANY data on each outer record except for the value of the DataKeyName. It is not exposed through <%# Eval("ArtistName") %>.
Here is some code:
<telerik:RadListView ID="SupplierRadListView" runat="server" ItemPlaceholderID="WorkPlaceHolder" OnItemDataBound="SupplierRadListView_ItemDataBound"
PageSize="20" AllowPaging="true" DataKeyNames="MemberID">
<LayoutTemplate>
<asp:Panel runat="server" ID="ArtistPlaceHolder">
<asp:Panel runat="server" ID="WorksPlaceHolder">
</asp:Panel>
</asp:Panel>
</LayoutTemplate>
<DataGroups>
<telerik:ListViewDataGroup GroupField="MemberID" DataGroupPlaceholderID="ArtistPlaceHolder">
<DataGroupTemplate>
<div style="float: left; width: 200px;">
<asp:Literal runat="server" ID="ArtistLiteral" />
</div>
<asp:Panel runat="server" ID="WorkPlaceHolder" />
</DataGroupTemplate>
</telerik:ListViewDataGroup>
</DataGroups>
<GroupSeparatorTemplate>
<hr />
</GroupSeparatorTemplate>
<ItemTemplate>
<div class="work_outer">
<div class="work_inner">
<%# Eval("Title") %>
</div>
</div>
</ItemTemplate>
</telerik:RadListView>
Layout will be:
Artist (name/description/rating)
-- Artwork (title/image/price)
-- Artwork (title/image/price)
-- Artwork (title/image/price)
Artist (name/description/rating)
-- Artwork (title/image/price)
-- Artwork (title/image/price)
-- Artwork (title/image/price)
Artist (name/description/rating)
-- Artwork (title/image/price)
-- Artwork (title/image/price)
-- Artwork (title/image/price)
My SQL query returns all the data on artists and artworks. I can bind this to my RadListView and get the artwork records looking OK by setting them to be the ItemPlaceHolder. But how can I get all the data for each artist such as Name, Description, Rating etc. I cannot understand how to get ANY data on each outer record except for the value of the DataKeyName. It is not exposed through <%# Eval("ArtistName") %>.
Here is some code:
<telerik:RadListView ID="SupplierRadListView" runat="server" ItemPlaceholderID="WorkPlaceHolder" OnItemDataBound="SupplierRadListView_ItemDataBound"
PageSize="20" AllowPaging="true" DataKeyNames="MemberID">
<LayoutTemplate>
<asp:Panel runat="server" ID="ArtistPlaceHolder">
<asp:Panel runat="server" ID="WorksPlaceHolder">
</asp:Panel>
</asp:Panel>
</LayoutTemplate>
<DataGroups>
<telerik:ListViewDataGroup GroupField="MemberID" DataGroupPlaceholderID="ArtistPlaceHolder">
<DataGroupTemplate>
<div style="float: left; width: 200px;">
<asp:Literal runat="server" ID="ArtistLiteral" />
</div>
<asp:Panel runat="server" ID="WorkPlaceHolder" />
</DataGroupTemplate>
</telerik:ListViewDataGroup>
</DataGroups>
<GroupSeparatorTemplate>
<hr />
</GroupSeparatorTemplate>
<ItemTemplate>
<div class="work_outer">
<div class="work_inner">
<%# Eval("Title") %>
</div>
</div>
</ItemTemplate>
</telerik:RadListView>