tags:

views:

375

answers:

2

I'd like to tinker with the auto-generated columns in a gridview a bit. What event would I want to override to modify them just after they are generated but before the control is rendered?

+1  A: 

The columns are added to the GridView when the DataBind() method is called

Jeff Fritz
+2  A: 

Check out this link for more information on Customizing the Auto-Generated Columns of a GridView Control:

http://msdn.microsoft.com/en-us/library/cc903950(VS.95).aspx

The particular event you are looking for would be the AutoGeneratingColumn event

More information on the AutoGeneratingColumn event

TheTXI