Click here to Skip to main content
14,217,717 members

Group GridView Data

Rate this:
4.85 (55 votes)
Please Sign up or sign in to vote.
4.85 (55 votes)
22 Aug 2014CPOL
A custom GridView control which provides you an additional facility to group the data in gridview along with the facility to customise the Group Header and Group Footer
body   
{
    background: #fefefe;
    font-size: .75em;
    font-family: 'Segoe UI', 'Segoe UI Symbol', Verdana, sans-serif, Arial;
    margin: 10px;
    padding: 0px;
    color: #696969;
}

p
{
    margin-bottom: 10px;
    line-height: 1.6em;
}

/* HEADINGS   
----------------------------------------------------------*/

h1, h2, h3, td
{
    color: #333333;
    text-transform: none;
    font-weight: 200;
    margin-bottom: 0px;
}

h1
{
    font-size: 1.6em;
    padding-bottom: 0px;
    margin-bottom: 0px;
}

h2
{
    font-size: 1.5em;
    font-weight: bold;
}

h3
{
    font-size: 1.2em;
    font-weight:bold;
}

table.grid
    {
      border-collapse: collapse;
      border:1px solid #9a9cf0;
      padding:0;
    }
        table.grid > tbody > tr {
            padding:0;
        }
        table.grid td {
            padding: 6px;
        }

        table.grid th {
            color:white;
            padding: 6px 5px;
            text-align: left;
            background-color: #000056;
        }

        table.grid > tr:nth-child(odd) td {
            background-color: #fbfbfb;
        }
        table.grid > tr:nth-child(even) td {
            background-color: #e8eef4;
        }
.groupHeader
{
    background-color:#9a9ca0; 
    font-weight:bold;
    margin:-6px;
    padding:5px 15px;
}
.groupFooter
{
    background-color:#9a9ca0; 
    font-weight:bold;
}

input[type=button]
{
    background-color:#e8eef4;
    border:1px solid #9a9cf0;
    border-radius:3px;
    font-family: 'Segoe UI', Arial, Calibri;
    font-weight:bold;
    font-size:12px;
}

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)

Share

About the Author

Anurag Gandhi
Architect
India India
Anurag Gandhi is a Developer, Consultant, Architect, Blogger, Speaker and a Microsoft Employee. He is passionate about programming.
He is extensively involved in Asp.Net Core, MVC/Web API, Microsoft Azure/Cloud, web application hosting/architecture, Angular, AngularJs, design and development. His languages of choice are C#, Node/Express, JavaScript, Asp .NET MVC, Asp, C, C++. He is familiar with many other programming languages as well. He mostly works with MS Sql Server as the preferred database and has worked with Redis, MySQL, Oracle, MS Access, etc. also.
He is active in programming communities and loves to share the knowledge with others whenever he gets the time for it.
He is also a passionate chess player.
Linked in Profile: https://in.linkedin.com/in/anuraggandhi
He can be contacted at: soft.gandhi@gmail.com

Disclaimer: Any posts, article, content present in this website is my personal opinion based on best of my knowledge and experience. None of the content provided by me should be considered as official communication/opinion or my Employer.

Stats

200.6K views
11.6K downloads
135 bookmarked