System.Windows.Forms.DataGrid.PreferredColumnWidth Property

Gets or sets the default width of the grid columns in pixels.

Syntax

[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataGridPreferredColumnWidthTypeConverter))]
[System.ComponentModel.DefaultValue(75)]
public int PreferredColumnWidth { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Set this property before resetting the DataGrid.DataSource and DataGrid.DataMember properties (either separately, or through the DataGrid.SetDataBinding(object, string) method), or the property will have no effect.

The property cannot be set to a value less than 0.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0