zoukankan
html css js c++ java
ASP.NET(VB):DataGrid中"加入序号列"和"截取定长字符串追加'...'"
1."加入序号列"
<
asp:TemplateColumn
HeaderText
="序号"
>
<
ItemStyle
HorizontalAlign
="Center"
></
ItemStyle
>
<
ItemTemplate
>
<%
# Container.ItemIndex
+
1
%>
</
ItemTemplate
>
</
asp:TemplateColumn
>
2."截取定长字符串,并追加'...'"
<
asp:TemplateColumn
HeaderText
="用户要求"
>
<
ItemTemplate
>
<
asp:Label
runat
="server"
Text
='<%#
Left(DataBinder.Eval(Container, "DataItem.User_Request"), 15) & IIf(Container.DataItem("User_Request").Length
>
15, "
", "") %>' tooltip='
<%
# DataBinder.Eval(Container,
"
DataItem.User_Request
"
)
%>
'>
</
asp:Label
>
</
ItemTemplate
>
</
asp:TemplateColumn
>
PS::利用DataGrid模板列
查看全文
相关阅读:
【贪心 堆】luoguP2672 推销员
【贪心 思维题】[USACO13MAR]扑克牌型Poker Hands
「整理」[图论]最短路系列
收集到的小玩意儿
初遇构造函数
在2440开发板液晶上显示两行字
error: converting to execution character set: Invalid or incomplete multibyte or wide character
宽字节
宽字符wchar_t和窄字符char区别和相互转换
linux获取文件大小的函数
原文地址:https://www.cnblogs.com/ding0910/p/314091.html
最新文章
HDU 1142 A Walk Through the Forest(最短路+dfs搜索)
[Codeforces 1011E] Border
[Codeforces 545E] Paths and Trees
[Codeforces 507E] Breaking Good
[JSOI 2016] 灯塔
[JSOI 2016] 最佳团体
[Codeforces 486B] Or in Matrix
[Codeforces 425A] Sereja and Swaps
[Codeforces 482B] Interesting Array
[Codeforces 482A] Diverse Permutation
热门文章
[Codeforces 639B] Bear and Forgotten Tree 3
【树状数组】CF961E Tufurama
【dp】奶牛家谱 Cow Pedigrees
初涉左偏树
【数论 dp】2048
初涉欧几里得算法系列
Educational Codeforces Round 40千名记
【图论】[USACO]控制公司 Controlling Companies
【网络流】[USACO4.2]草地排水Drainage Ditches
【树状数组 思维题】luoguP3616 富金森林公园
Copyright © 2011-2022 走看看