网格视图按钮字段 [英] Grid view Button Field
本文介绍了网格视图按钮字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello All
我想从链接到标签更改网格视图按钮字段。
我怎么做Plz
Hello All
I Want to Change Grid View Button Field from Link To Label.
How i Can do that Plz
推荐答案
如果你想在网格视图中使用标签你不能使用你必须使用的按钮字段在网格视图中使用项目模板,如下所示:
If you want to use label in grid view you can't use button field you have to use item template in grid view like this:
<Columns>
<asp:TemplateField HeaderText="Label" ItemStyle-Width="50px">
<ItemTemplate>
<asp:Label ID="lbl" runat="server" Text="Your Text" ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
接受为答案如果解决你的问题,请投票。
Accept as answer and vote if solve your problem.
这篇关于网格视图按钮字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文