RadListView with DataGrouping - how to display data

2 posts, 0 answers
  1. Gordon
    Gordon avatar
    1 posts
    Member since:
    Dec 2007

    Posted 08 Jul 2014 Link to this post

    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">
            <asp:Panel runat="server" ID="ArtistPlaceHolder">

                <asp:Panel runat="server" ID="WorksPlaceHolder">
            <telerik:ListViewDataGroup GroupField="MemberID" DataGroupPlaceholderID="ArtistPlaceHolder">
                    <div style="float: left; width: 200px;">
                    <asp:Literal runat="server" ID="ArtistLiteral" />
                    <asp:Panel runat="server" ID="WorkPlaceHolder" />
            <hr />
            <div class="work_outer">
                <div class="work_inner">
                    <%# Eval("Title") %>

  2. Pavlina
    Pavlina avatar
    6183 posts

    Posted 11 Jul 2014 Link to this post

    Hi Gordon,

    I am afraid that the requested functionality is not supported out of the box by RadListView control, because ListViewDataGroupItem does not contain this information. Please excuse us for the inconvenience caused.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top