how to add title for every header column in gridview in ASP.NET

前端 未结 1 1864
清酒与你
清酒与你 2021-01-15 01:29

i\'m using ASP.NET , i have a gridview and i need to put a title in every header column , title will show on moseover ................................. do i have to convert

相关标签:
1条回答
  • 2021-01-15 02:13

    I don't think there is a way in ASP.NET, but you can always do it in CSS just use HeaderStyle-CssClass on your template.

    UPDATE:

    Ok, I was wrong, ASP.NET does support this functionality, you just need use a HeaderTemplate in your TemplateField.

    <asp:TemplateField SortExpression="Subnet" HeaderText="Subnet">
       <HeaderTemplate>
           <asp:Label ID="SubnetHeader" ToolTip="My Tip to you" runat="server" Text="Label"></asp:Label>
       </HeaderTemplate>
    
       <ItemTemplate >  
           <asp:Label ID="lblSubnet" runat="server" Text='<%# Bind("Subnet") %>' ></asp:Label>       
       </ItemTemplate>
    </asp:TemplateField>
    
    0 讨论(0)
提交回复
热议问题