如何在gridview多列中显示前10个字符 [英] How to display the first 10 characters in a gridview multiple colum
本文介绍了如何在gridview多列中显示前10个字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在每个gridview colums中显示前10个字符???
解决方案
有几种方法可以做到这一点。
一个是修改ItemTemplate
在TemplateField
< asp:templatefield headertext = 描述 xmlns:asp = #unknown >
< itemtemplate >
< asp:label id = lblDescription runat = < span class =code-keyword> server >
Text ='< %#Limit(Eval( 描述), 10 )%>'
Tooltip ='<% #Eval( 说明)%>'>
< / asp:label >
< / itemtemplate >
< / asp:templatefield > 跨度>
How to display the first 10 characters in a every gridview colums???
解决方案
There are few ways to do this.
One is by modifying theItemTemplate
inTemplateField
<asp:templatefield headertext="Description" xmlns:asp="#unknown"> <itemtemplate> <asp:label id="lblDescription" runat="server"> Text='<%# Limit(Eval("Description"),10) %>' Tooltip='<%# Eval("Description") %>'> </asp:label> </itemtemplate> </asp:templatefield>
这篇关于如何在gridview多列中显示前10个字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文