編輯

共用方式為


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.

CreateGridColumn(PropertyDescriptor)

Creates a new DataGridColumnStyle with the specified PropertyDescriptor.

CreateGridColumn(PropertyDescriptor, Boolean)

Creates a DataGridColumnStyle using the specified PropertyDescriptor.

protected:
 virtual System::Windows::Forms::DataGridColumnStyle ^ CreateGridColumn(System::ComponentModel::PropertyDescriptor ^ prop, bool isDefault);
protected virtual System.Windows.Forms.DataGridColumnStyle CreateGridColumn (System.ComponentModel.PropertyDescriptor prop, bool isDefault);
abstract member CreateGridColumn : System.ComponentModel.PropertyDescriptor * bool -> System.Windows.Forms.DataGridColumnStyle
override this.CreateGridColumn : System.ComponentModel.PropertyDescriptor * bool -> System.Windows.Forms.DataGridColumnStyle
Protected Overridable Function CreateGridColumn (prop As PropertyDescriptor, isDefault As Boolean) As DataGridColumnStyle

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

CreateGridColumn(PropertyDescriptor)

Creates a new DataGridColumnStyle with the specified PropertyDescriptor.

protected:
 virtual System::Windows::Forms::DataGridColumnStyle ^ CreateGridColumn(System::ComponentModel::PropertyDescriptor ^ prop);
protected virtual System.Windows.Forms.DataGridColumnStyle CreateGridColumn (System.ComponentModel.PropertyDescriptor prop);
abstract member CreateGridColumn : System.ComponentModel.PropertyDescriptor -> System.Windows.Forms.DataGridColumnStyle
override this.CreateGridColumn : System.ComponentModel.PropertyDescriptor -> System.Windows.Forms.DataGridColumnStyle
Protected Overridable Function CreateGridColumn (prop As PropertyDescriptor) As DataGridColumnStyle

Parameters

prop
PropertyDescriptor

The PropertyDescriptor to use for creating the grid column style.

Returns

The new DataGridColumnStyle.

Applies to