During development, fields in the GridView control header are sometimes merged. Multi-row headers, multi-column merging, understanding of the principles, implementation, can use freely. The following describes how to use Insus. NET.
Create a site, create An aspx webpage, and pull the GridView control.
Go to. cs and bind data to the GridView first:
OK, the program running result is as follows:
If you have read the http://www.cnblogs.com/insus/p/3232057.html article, you will understand how to dynamically change the information of the GridView Header column. Therefore, Insus. NET can be modified by referring to this article to meet the requirements of this article. It can be done simply, just as complicated.
Next, go to the. aspx page and add an event OnRowCreated = "GridViewFruit_RowCreated" in the GridView control ":
Go to. cs to write the OnRowCreated Event Logic Program:
Final effect: