Click here to Skip to main content
15,885,366 members
Articles / Web Development / HTML

Formatting AutoGenerateColumns in an ASP.NET Grid

Rate me:
Please Sign up or sign in to vote.
4.78/5 (26 votes)
23 Oct 2006CPOL6 min read 187.2K   1.9K   96  
Demonstrates how to apply conditional formatting in a GridView or DataGrid when columns are dynamically generated, and wrap such code in an IExtenderProvider control.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<appSettings>
		<add key="Name" value="Northwind"/>
		<add key="Slogan" value="We feed the world!"/>
		<add key="Address" value="15th, Main St." />
		<add key="City" value="New York"/>
		<add key="Phone" value="(555)400-500"/>
		<add key="Fax" value="(555)600-700"/>
		<add key="Email" value="office@northwind.com"/>
		<add key="ContactName" value="Bill Rogers"/>
		<add key="IssueDate" value="05/23/2000"/>
		<add key="ConnectionString" value="Data Source=localhost;Initial Catalog=Northwind;User Id=sa;Password=;"/>
	</appSettings>
</configuration>

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