标签:
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;
}
}
}
标签:
原文地址:http://www.cnblogs.com/houzf/p/5620162.html