Automating DevExpress XtraGrid Column Width

Follow the steps below to automate column width settings in DevExpress XtraGrid.

  • 1 - "Run Designer" opens.
  • 2 - Select "Views" from the left panel.
  • 3 - Select "OptionsView" from the right side panel.
  • 4 - Set the "ColumnAutoWidth" property to "true".

An example of setting it as code is given below..


this.myListGridView.OptionsView.ColumnAutoWidth = false;       



You May Interest

DevExpress XtraGrid Selecting Only Cell on Row Click

DevExpress XtraGrid Cell Information Horizontal Alignment Adjustm ...

DevExpress XtraGrid Selecting Entire Row on Row Click

DevExpress XtraGrid Cell Text Settings by Column

Putting Multi Selection and Checkbox Columns in DevExpress XtraGr ...