Asp.net 在代码隐藏中添加gridview列
我正在使用C#中的gridview,需要动态添加一列。 我需要在代码背后实现以下标记Asp.net 在代码隐藏中添加gridview列,asp.net,Asp.net,我正在使用C#中的gridview,需要动态添加一列。 我需要在代码背后实现以下标记 <headertemplate> <a href="javascript:var popup = window.open('Pop.aspx? param=myParameter','Pop','width=200,height=200');"> <asp:Label ID="Label1" runat="
<headertemplate>
<a href="javascript:var popup = window.open('Pop.aspx? param=myParameter','Pop','width=200,height=200');">
<asp:Label ID="Label1" runat="server" Text="ColumnName"
ToolTip="Click here for more information"></asp:Label>
</a>
</headertemplate>
<Itemtemplate>
....
....
该列有下划线,用户可以单击此处打开弹出窗口
谢谢。您是否想过放弃预制asp.net控件并动态构建您自己的表?Tony到目前为止,您尝试了什么来获取您想要的内容?您得到了什么?到目前为止,我创建了一个模板类来表示动态模板列(来自msdn的示例)我可以添加一列,但我不确定标题是否可以点击(用于弹出)。