When are the auto-generated columns in a gridview added?

十年热恋 提交于 2019-12-13 15:43:01

问题


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:


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




回答2:


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




回答3:


Those two links are for the Datagrid not Gridview.



来源:https://stackoverflow.com/questions/956498/when-are-the-auto-generated-columns-in-a-gridview-added

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!