Click here to Skip to main content
15,884,836 members
Articles / Web Development / ASP.NET

GroupingView

Rate me:
Please Sign up or sign in to vote.
4.88/5 (21 votes)
16 Jul 2008CPOL11 min read 110.6K   4.1K   123  
A templated, data-bound ASP.NET 2.0 control that groups data according to a field in the source, with support for aggregations.
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="TestGroupingView.Site" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>GroupingView Examples</title>
    <link type="text/css" rel="Stylesheet" href="css/Site.css" />
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    
    <%-- header --%>
    <div id="header">
        GroupingView Examples
    </div>
    
    <%-- menu --%>
    <div id="menu">
        <asp:PlaceHolder ID="phMenuItems" runat="server">
            <asp:HyperLink ID="HyperLink0" runat="server" NavigateUrl="~/Default.aspx" Text="Home" />
            <br />
            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Sample1.aspx" Text="Sample 1" />
            <asp:HyperLink ID="HyperLink7" runat="server" NavigateUrl="~/Sample2.aspx" Text="Sample 2" />
            <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Sample3.aspx" Text="Sample 3" />
            <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/Sample4.aspx" Text="Sample 4" />
            <asp:HyperLink ID="HyperLink8" runat="server" NavigateUrl="~/Sample5.aspx" Text="Sample 5" />
            <asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="~/Items1.aspx" Text="Groups, Items, and NestedItems" />
            <asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl="~/Commands1.aspx" Text="Command Handling" />
            <asp:HyperLink ID="HyperLink6" runat="server" NavigateUrl="~/Aggregations1.aspx" Text="Aggregations" />
        </asp:PlaceHolder>
        
        <br /><br /><br />
    </div>
    
    <%-- content --%>
    <div id="contentTitle">
        <asp:ContentPlaceHolder ID="Title" runat="server" />
    </div>
    
    <div id="contentExample">
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">        
        </asp:ContentPlaceHolder>
    </div>
    
    <div id="contentDescription">
        <asp:ContentPlaceHolder ID="Description" runat="server" />
    </div>
    
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
University of Nevada, Las Vegas
United States United States
With a background in education, music, application development, institutional research, data governance, and business intelligence, I work for the University of Nevada, Las Vegas helping to derive useful information from institutional data. It's an old picture, but one of my favorites.

Comments and Discussions