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">
        <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>









  2. Pavlina
    Admin
    Pavlina avatar
    6084 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.









    Regards,
    Pavlina
    Telerik
     

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top