DataGrid.CreateGridColumn Method

Definition

Creates a new DataGridColumnStyle that is added to the control.

Overloads

CreateGridColumn(PropertyDescriptor, Boolean)

Creates a DataGridColumnStyle using the specified PropertyDescriptor.

C#
protected virtual System.Windows.Forms.DataGridColumnStyle CreateGridColumn(System.ComponentModel.PropertyDescriptor prop, bool isDefault);

Parameters

prop
PropertyDescriptor

The PropertyDescriptor to use for creating the grid column style.

isDefault
Boolean

true to set the column style as the default; otherwise, false.

Returns

The new DataGridColumnStyle.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0

CreateGridColumn(PropertyDescriptor)

Creates a new DataGridColumnStyle with the specified PropertyDescriptor.

C#
protected virtual System.Windows.Forms.DataGridColumnStyle CreateGridColumn(System.ComponentModel.PropertyDescriptor prop);

Parameters

prop
PropertyDescriptor

The PropertyDescriptor to use for creating the grid column style.

Returns

The new DataGridColumnStyle.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0