Last Updated: February 25, 2016
·
898
· hjwu

Some tips to set DevExpress GridView

Disable Focused Cell

gv.OptionsSelection.EnableAppearanceFocusedCell = false;

Center Column Header or Cell

gv.Columns[i].AppearanceHeader.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
gv.Columns[i].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;

Set Column DisplayFormat

gv.Columns[i].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
gv.Columns[i].DisplayFormat.FormatString = "n";