Last Updated: February 25, 2016
·
1.013K
· 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";