Programmatically creating grid view header row in asp
1. 9/1/2015 Programmatically creating GridView header row in ASP.NET using C#
http://www.dotnetfox.com/articles/programmaticallycreatinggridviewheaderrowinAspNetusingCSharp1059.aspx 1/6
by: Saravanan Arumugam Date: 25/10/2013 Page
views:
54522
Programmatically creating GridView header row in
ASP.NET using C#
Hide demo Download
In this article I’m going to explain how to create GridView header row programmatically in ASP.NET
using C#.
I got one requirement that I have to create GridView header row programmatically. In my scenario I
have to create Multiple Header row which includes header style. It’s very easy once I figure out what the
proper event in the page lifecycle to use. I have used OnRowCreated="gvEmployee_RowCreated" event to
achieve the task.
In this demo I have used XML to bind GridView. After binding the GridView we have to create
OnRowCreated event.
Sample code:
protected void gvEmployee_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
…
}
}
GridViewRow class is used to create GridView rows which includes DataRow, EmptyDatarow,
Footer, Header, Pager and Separator.
Dynamic Accordion
menu or Vertical menu
using jQuery in ASP.NET
MVC
Adding a Controller in
ASP.NET MVC 4
Creating ASP.NET MVC 4
web application with
Empty project template
Getting started with
ASP.NET MVC 4
Introduction to ASP.NET
MVC
Bind GridView using
jQuery in ASP.NET
Google Geo Chart or Geo
map with custom Color
and Tooltip in ASP.NET
Subscribe via Email
Recent Post
.NET News Weekly
Everything .NET, delivered straight to your inbox, every week.
Home ASP.NET Charts WCF XML AJAX JQuery Tips & Tricks