Skip to content

DataGridViewColumn

Radu Martin edited this page Apr 14, 2017 · 9 revisions

These extenders provide a lot of style settings. The main static method is:

SetStyles(int Width, 
          DataGridViewContentAlignment Alignment,
          string Format)

Width - width of the column,
Alignment - indicating the position of the cell content,
Format - format string applied to the textual content.

In addition, there are static methods for configuring different styles:

SetAutoSizeFillStyle()

SetAutoSizeAllCellsStyle()

SetNumberStyle()

SetDecimalStyle()

SetMoneyStyle()

SetPercentStyle()

SetDateStyle()

SetDateTimeStyle()

SetDateTimeWithSecondsStyle()

Execution can be combined, because these methods return the initial column:

column.SetDateTimeStyle().SetAutoSizeFillStyle(100);