Tooltip in GridView

后端 未结 2 1925
刺人心
刺人心 2020-12-15 14:22

What is the easiest way to include a tooltip in the gridView column?

For example in this column



        
相关标签:
2条回答
  • 2020-12-15 14:51

    e.Row.Cells[7].ToolTip = e.Row.Cells[7].Text;

    i did something like that it seems worked. What i do is to show the content of cell as a tool tip. You can put some longer comments here.

    I handled situtation from codebehind. No sure it is best solution.

    hope it helps.

    0 讨论(0)
  • 2020-12-15 15:05

    Replaced with template

    <asp:TemplateField HeaderText="Comments" SortExpression="short_comment">
         <ItemTemplate>
             <asp:Label ID="Label1" runat="server" Text='<%# Bind("short_comment") %>' ToolTip ='<%# Bind("longer_comment") %>'></asp:Label>
         </ItemTemplate>
    </asp:TemplateField>
    
    0 讨论(0)
提交回复
热议问题