【问题标题】:select button on gridview - asp.netgridview 上的选择按钮 - asp.net
【发布时间】:2011-07-08 21:53:11
【问题描述】:

在 asp.net 中,当您在 gridview 上有一个自动生成的选择按钮时,是否可以将其文本从“选择”更改为您选择的其他内容?如果可以的话,谁能给我举个例子?

再次感谢

【问题讨论】:

  • 您能提供您的网格的代码吗?
  • 嗨,我已将其包含在下面的答案中

标签: asp.net


【解决方案1】:

检查这个类似的问题:

Changing text of an autogenerated select column of a gridview in asp.net - How?

例子:

<asp:buttonfield buttontype="Button" 
                 commandname="Select"
                 headertext="Select Customer" 
                 text="SelectText"/>

【讨论】:

    【解决方案2】:
    <asp:GridView ID="gvSearch" runat="server" Visible="False" 
                    OnPageIndexChanging="Grid_Changing" AllowPaging="True" AllowSorting="True" 
                    AutoGenerateSelectButton="True" CellPadding="4" Font-Names="Arial" 
                    Font-Size="XX-Small" ForeColor="#333333" GridLines="None" 
                    onselectedindexchanged="gvSearch_SelectedIndexChanged" PageSize="100">
                    <AlternatingRowStyle BackColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-05-03
      • 2015-11-11
      • 1970-01-01
      • 2018-11-27
      • 2013-07-27
      • 1970-01-01
      • 2012-10-14
      相关资源
      最近更新 更多