gridview中如果文字太多指点要显示的文字
生活随笔
收集整理的這篇文章主要介紹了
gridview中如果文字太多指点要显示的文字
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
C#和VB: GridView的列寬如何固定住,在數據很長的情況下也不改變寬度
C#:如果單元格數據沒必要全部顯示的話,就用<%#(DataBinder.Eval(Container.DataItem,"website").ToString().Length>20)? (DataBinder.Eval(Container.DataItem,"website").ToString().Substring(0,20)): (DataBinder.Eval(Container.DataItem,"website") )%>來取前20個字符來顯示。
VB:眾所周知用left函數如:<%#left(DataBinder.Eval(Container.DataItem,"website"),20)#%>
C#:如果單元格數據沒必要全部顯示的話,就用<%#(DataBinder.Eval(Container.DataItem,"website").ToString().Length>20)? (DataBinder.Eval(Container.DataItem,"website").ToString().Substring(0,20)): (DataBinder.Eval(Container.DataItem,"website") )%>來取前20個字符來顯示。
VB:眾所周知用left函數如:<%#left(DataBinder.Eval(Container.DataItem,"website"),20)#%>
轉載于:https://www.cnblogs.com/lizhuan/archive/2009/07/25/1530811.html
總結
以上是生活随笔為你收集整理的gridview中如果文字太多指点要显示的文字的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [转]JavaScript优化方案
- 下一篇: COM编程入门---转发