网格视图中的链接按钮 [英] linkbutton in grid view

查看:63
本文介绍了网格视图中的链接按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在网格视图表中使用链接按钮coloumn

how to use link button in grid view table coloumn

推荐答案

您可以在GridView中使用LinkBut​​ton,方法是在GridView中使用模板字段.

在ItemTemplate中,您可以使用如下所示的链接按钮
You can use LinkButton in GridView, By using Template Fields in the GridView.

In ItemTemplate you can use link button like below
<asp:GridView id="GridView1" runat="server" autogeneratecolumns="False">
<columns>
<asp:TemplateField>
 <itemtemplate>
    <asp:LinkButton text="Operation" id="Lb1" onclick="Click_event" runat="server" />
  </itemtemplate>

</columns>



看看 MSDN文章 [链接1 [ ^ ]
带有确认的GridView删除 [



Have a look at MSDN Article[^]

some useful links
Link 1[^]
GridView Delete, with Confirmation[^]


在各列中添加TemplateField,并在其下添加itemTemplate.
现在您可以在网格视图中使用任何控件了
Add TemplateField in columns, under that add itemTemplate.
now you can any controls in grid view


这篇关于网格视图中的链接按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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