向CommandField添加工具提示ButtonType =" Link"

时间:2014-03-04 10:50:23

标签: c# asp.net gridview

我正在尝试在gridview上的命令按钮中添加工具类型,但我有点卡住了。

这是标记...

<asp:CommandField ButtonType="Link" ShowEditButton="true" EditText="&#x21" ShowDeleteButton="true" DeleteText="&#x33;" CancelText="&#x4F" ItemStyle-CssClass="View1 View2 View3" ItemStyle-Width="45px" UpdateText="&#x50">
    <ControlStyle Font-Names="'WingDings 2'" ForeColor="Black" Font-Size="16px" />
</asp:CommandField>

当我在代码隐藏中断点并查看e.Row.Cells中的内容时,它是DataControlLinkButton的集合,但我似乎无法在文档中找到对此的任何引用,以查看是否存在{ {1}}我可以设置。

1 个答案:

答案 0 :(得分:1)

您可以在RowDataBound的{​​{1}}上进行设置。

我正在从我的某个实现中共享代码片段。

Gridview

希望这会有所帮助..

相关问题