在GridView中,設(shè)置字符超出單元格部分的內(nèi)容用“...”表示,代碼如下:
<asp:TemplateField HeaderText="用途" SortExpression="USE_FOR">
<ItemTemplate>
<div style="width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none" title='<%# Eval("USE_FOR")%>'>
<asp:Label ID="lblUSE_FOR" runat="server" Text='<%# Bind("USE_FOR")%>'></asp:Label>
</div>
</ItemTemplate>
</asp:TemplateField>
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點(diǎn)擊舉報(bào)。