Developer Express Gridview的精度设置

Developer Express Gridview的精度设置,gridview,devexpress,precision,Gridview,Devexpress,Precision,此代码当前绑定到一个列表: @Html.DevExpress().GridView( settings => { settings.Name = "stdTable"; settings.CallbackRouteValues = ""; settings.SettingsBehavior.AllowGroup = false; //true; settings.SettingsBehavior.AllowS

此代码当前绑定到一个列表:

@Html.DevExpress().GridView(
    settings =>
    {
        settings.Name = "stdTable";
        settings.CallbackRouteValues = "";

        settings.SettingsBehavior.AllowGroup = false; //true;
        settings.SettingsBehavior.AllowSort = false; //true;
        settings.Settings.ShowGroupPanel = false;  //true; 
    }
).Bind(Model.ListOfStuff).GetHtml()
我的某些列的数值最多显示10位小数。是否有办法在“设置”中指定特定列的精度

我确实在StackOverflow上找到了这个,但我不确定它是否适合这里:

gridColumn.DisplayFormat.FormatString = "N2";
gridColumn.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom;
请假设我无法在数据列表到达此网格控件之前编辑它


非常感谢您提供任何信息。

您可以使用CustomColumnDisplayText事件

protected void grid_CustomColumnDisplayText(object sender, ASPxGridViewColumnDisplayTextEventArgs e)
{
    if ("columnName" == e.Column.FieldName)
    {
        e.DisplayText = performFormattingHere;
    }
}
您可以在此处阅读有关CustomColumnDisplay事件的更多信息: