留个记号,下次用的时候,就不用浪费N多时间了. 还有,DataFormatString = "{0:F}",是默认格式,显示两位小数,如果需要显示的小数位数为其他值,DataFormatString = "{0:Fn}"即可.
代码如下:
DataFormatString="{0:格式字符串}"
在DataFormatString 中的 {0} 表示数据本身,而在冒号后面的格式字符串代表所们希望数据显示的格式;
查看更多关于asp.net DataFormatString格式化GridView的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did35869