DataGridColumnStyle::Width Property

 

Gets or sets the width of the column.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
property int Width {
	virtual int get();
	virtual void set(int value);
}

Property Value

Type: System::Int32

The width of the column, in pixels.

The following code example sets the width of a DataGridColumnStyle to a new value.


Private Sub SetWidth()
   Dim dgc As DataGridColumnStyle
   dgc = DataGrid1.TableStyles(0).GridColumnStyles("id")
   dgc.Width = 500
End Sub

.NET Framework
Available since 1.1
Return to top
Show: