如何在GridView中创建按钮 [英] How to create button inside gridview

查看:90
本文介绍了如何在GridView中创建按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi ..

我想知道如何在.Net Window应用程序的gridview中创建编辑和delee按钮.
帮帮我吧.


谢谢.

hi..

i wanna know how to create edit and delee button inside the gridview in .Net Window Application.
Help me plz..


Thanking you.

推荐答案

项目模板中的内部模板字段可以创建
< pre>
< asp:gridview id ="grid" runat ="server">
< asp:templatefield>
< itemtemplate>
< asp:buttton id ="btnEdit" runat ="server" text ="Edit"/>
< asp:buttton id ="btndelete" runat ="server" text =删除"/>
</itemtemplate>
</asp:templatefield>
</asp:gridview>
</pre>



在rowcommand中,您可以进行计算
inside template field in item template you can create
<pre>
<asp:gridview id="grid" runat="server">
<asp:templatefield>
<itemtemplate>
<asp:buttton id="btnEdit" runat="server" text="Edit"/>
<asp:buttton id="btndelete" runat="server" text="Delete"/>
</itemtemplate>
</asp:templatefield>
</asp:gridview>
</pre>



in rowcommand u can do calculations


这篇关于如何在GridView中创建按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆