The ICollection interface is the base interface for classes in the System.Collections namespace. Dictionary and IList are more specialized interfaces that are based on the ICollection interface. An IDictionary implementation is a collection of key-and-value pairs, like the Hashtable class. An IList implementation is a collection of values that can be sorted and whose members can be accessed by index, like the Array List class.We use the DataTable to add column. And use the DataRow to add row. We use the Literal control to reserve a location on the Web page to display text. The Literal control is similar to the Label control, except the Literal control does not allow you to apply a style to the displayed text. You can programmatically control the text displayed in the control by setting the Text property. We use the Literal control to add complex head.

This tutorial will show you how to add GridViewComplexHead using ASP.NET 2.0 and C#.NET .First, you need to import the System.Collections namespace.

We can add complex table head to GridView. We use the Literal control to add table head.

The front end Default.aspx page looks something like this:

The flow for the code behind page is as follows.

Download Source Files