以文本字段为链接的网格视图 [英] grid view with text field as a link

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

问题描述

<asp:GridView ID="reportTable" runat="server" CellPadding="5"

                ForeColor="#333333" AllowSorting="True" GridLines="Both"

                AutoGenerateColumns="False">
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="checkBox" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="Auftragsnummer" />
                    <asp:BoundField HeaderText="Mechanische" />
                    <asp:BoundField HeaderText="Elektrische" />


<p>
            <asp:Button ID="select" runat="server" Text="Auftrag koordinieren" onclick="select_Click" />
        </p>





这将显示带有网格视图的表格,每一行都有一个复选框.但是,我想将表格的第一个条目"auftragsnummer"作为指向下一页的链接,而不是向下滚动





This is displaying a table with grid view with the option of a checkbox for every row.However i would like to make the first entry of the table that is the "auftragsnummer" as a link that will point to the next page instead of scrolling down and selecting on click.Can anyone help me with this?

推荐答案

替换为:
<asp:boundfield headertext="Auftragsnummer" xmlns:asp="#unknown" />


有了这个:


With this one:

<asp:hyperlinkfield xmlns:asp="#unknown">
    DataNavigateUrlFields="UrlColumn"
    DataTextField="YourColumnName"
    HeaderText="Auftragsnummer"
    SortExpression="YourColumnName" />
</asp:hyperlinkfield>



希望对您有帮助



Hope you find it helpful


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

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