Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 在代码隐藏中添加gridview列_Asp.net - Fatal编程技术网

Asp.net 在代码隐藏中添加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="

我正在使用C#中的gridview,需要动态添加一列。 我需要在代码背后实现以下标记

   <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的示例)我可以添加一列,但我不确定标题是否可以点击(用于弹出)。