首页 > 其他 > 详细

dev 设置表格一列数据显示格式

时间:2016-06-27 15:20:09      阅读:348      评论:0      收藏:0      [点我收藏+]

void gridView_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
{
if (e.Column.FieldName == "GEO_LAT")
{
if (e.DisplayText.Length == 9)
{
string newste1 = e.DisplayText.Substring(0, 7);
string newste2 = e.DisplayText.Substring(7, 2);
e.DisplayText = newste1 + "." + newste2;
}
}
if (e.Column.FieldName == "GEO_LONG")
{
if (e.DisplayText.Length == 10)
{
string newste1 = e.DisplayText.Substring(0, 8);
string newste2 = e.DisplayText.Substring(8, 2);
e.DisplayText = newste1 + "." + newste2;
}
}
}

dev 设置表格一列数据显示格式

原文:http://www.cnblogs.com/houzf/p/5620162.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!