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

GridThemes

Rate me:
Please Sign up or sign in to vote.
4.92/5 (51 votes)
4 Mar 2007CPOL10 min read 168.7K   1.5K   161  
Combining a BuildProvider and IExtenderProvider to create a declarative framework for conditional formatting in ASP.NET GridViews.
<%@ Master Language="C#" %>
<%@ Register Assembly="GridThemes" Namespace="UNLV.IAP.GridThemes" TagPrefix="cc1" %>

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

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>GridThemes Demo</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table class="masterTable" cellpadding="6" cellspacing="0">
          <tr valign="middle">
            <td colspan="2" class="masterHeader">
                GridThemes Demo
            </td>
          </tr>
          <tr valign="top">
            <td class="masterMenu">
                <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1"
                    DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" 
                    StaticDisplayLevels="3" StaticSubMenuIndent="10px">
                    <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                    <DynamicHoverStyle BackColor="#666666" ForeColor="White" />
                    <DynamicMenuStyle BackColor="#E3EAEB" />
                    <StaticSelectedStyle BackColor="#1C5E55" ForeColor="White" />
                    <DynamicSelectedStyle BackColor="#1C5E55" />
                    <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                    <StaticHoverStyle BackColor="#666666" ForeColor="White" />
                    <LevelMenuItemStyles>
                        <asp:MenuItemStyle Font-Underline="False" />
                        <asp:MenuItemStyle Font-Bold="True" Font-Italic="False" Font-Underline="False" HorizontalPadding="4px"
                            ItemSpacing="4px" VerticalPadding="2px" />
                    </LevelMenuItemStyles>
                </asp:Menu>
                <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
                                 
            </td>
            <td class="masterContent">
                <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
                </asp:contentplaceholder>
            </td>
          </tr>
        </table>
            
    </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