dev 设置表格一列数据显示格式
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;
}
}
}
gridView3.CustomColumnDisplayText += gridView_CustomColumnDisplayText;