列值作为gridview中的链接按钮 [英] Column values as link button in gridview

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

问题描述

亲爱的所有人,



我使用Gridview做了很多项目,因为它是ASP.Net中最常用的控件之一。但是,现在我有不同的要求。即,当GridGeneratedColumns为true时,将Gridview列值设为Link按钮





以下是相同的aspx:



Dear All,

I have done many projects using Gridview as it is one of the most commonly used controls in ASP.Net. But, now I have different requirement. i.e., Making Gridview column values as Link button
when AutoGeneratedColumns is true.

Below is the aspx for the same:

<asp:GridView ID="GridView1"

                AutoGenerateColumns="true"

                runat="server" DataSourceID="SqlDataSource1" OnRowDataBound="GridView1_RowBound">
            </asp:GridView>

            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GridTestSqlConnectionString %>" SelectCommand="SELECT * FROM [tblEmployee]"></asp:SqlDataSource>







我们非常感谢任何有关代码段的帮助。



问候,




Any help with a code snippet would be greatly appreciated.

Regards,

推荐答案

ConnectionStrings:GridTestSqlConnectionString %> SelectCommand = SELECT * FROM [tblEmployee] > < / asp:SqlDataSource >
ConnectionStrings:GridTestSqlConnectionString %>" SelectCommand="SELECT * FROM [tblEmployee]"></asp:SqlDataSource>







任何有关代码段的帮助都将是非常感谢。



问候,




Any help with a code snippet would be greatly appreciated.

Regards,


看看这篇文章:



http://www.aspdotnet-sharepoint.com /2011/12/link-button-in-gridview-in-aspnet.html [ ^ ]
Look at this article:

http://www.aspdotnet-sharepoint.com/2011/12/link-button-in-gridview-in-aspnet.html[^]


读取这篇文章


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

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