Gridview 中:HyperLinkField如何改名?
下面这段是 在GridView运行正常,可是我想把它显示成为“选择”,而不是PRID的值,找了半天没找到,请问该如何修改啊?见图中的第一列
<Columns>
<asp:HyperLinkField DataNavigateUrlFields="PRID"
DataNavigateUrlFormatString="~/ReceivableTable/BrowserToReceivableManage.aspx?PRID"
DataTextField="PRID" HeaderText="明细"
NavigateUrl="~/ReceivableTable/BrowserToReceivableManage.aspx" Target="_blank"
Text="999"/>
---------------------------------图-------------------------------------
------解决方案--------------------DataTextFormatString="选择"
------解决方案-------------------- <asp:HyperLinkField DataNavigateUrlFields="PRID"
DataNavigateUrlFormatString="~/ReceivableTable/BrowserToReceivableManage.aspx?PRID"
DataTextField="PRID" HeaderText="明细"
NavigateUrl="~/ReceivableTable/BrowserToReceivableManage.aspx" Target="_blank"
Text="999"/>
将DataTextField属性去掉,添加Text属性
<asp:HyperLinkField DataNavigateUrlFields="PRID"
DataNavigateUrlFormatString="~/ReceivableTable/BrowserToReceivableManage.aspx?PRID"
Text="选择" HeaderText="明细"
NavigateUrl="~/ReceivableTable/BrowserToReceivableManage.aspx" Target="_blank"
Text="999"/>