Grouping Titles

3 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 05 May 2010 Link to this post

    How can I get Group Titles (based on the dataset) into my listview?

    The H2 in my Group Template doesn't appear to work, but the data IS in the dataset

     <telerik:RadListView ID="imageListView" runat="server" onneeddatasource="imageListView_NeedDataSource" 
                                     ItemPlaceholderID="mainImagesContainer" GroupPlaceholderID="GroupContainer"
     
                    <LayoutTemplate> 
                        <asp:PlaceHolder ID="GroupContainer" runat="server" /> 
                    </LayoutTemplate> 
     
                    <GroupTemplate> 
                        <h2><%# Eval("LibraryName")%></h2
                        <asp:PlaceHolder ID="mainImagesContainer" runat="server" /> 
                    </GroupTemplate> 
     
                    <ItemTemplate> 
                        <div class="imageContainer"
                            <asp:Image ID="image" runat="server" CssClass="imageItem" ImageUrl='<%# Eval("ImageURL") %>' EnableViewState="false" /><br /> 
                            <asp:CheckBox ID="check" runat="server" CssClass="checkItem" EnableViewState="false" /> 
                            <asp:Label ID="name" runat="server" CssClass="imageName" EnableViewState="false" Text='<%# Eval("ImageTitle") %>' /> 
                        </div> 
                    </ItemTemplate> 
                </telerik:RadListView> 

    Is this just not supported?
  2. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 05 May 2010 Link to this post

    ....oh wait

    Am I reading this right?  The grouping isn't based on a field?

    ...is it COUNT based?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sean Sparkman
    Sean Sparkman avatar
    6 posts
    Member since:
    Nov 2009

    Posted 06 May 2010 Link to this post

    What I have done is created a field in the class of the page (or control) for the title.  I setup the ItemDataBound event to look at the field in the class and the field in the datasource.  If they are different make the title label, literal or whatever control visible.
Back to Top