DataGridColumnStyle.Width 屬性

定義

取得或設定資料行的寬度。

public:
 virtual property int Width { int get(); void set(int value); };
public virtual int Width { get; set; }
member this.Width : int with get, set
Public Overridable Property Width As Integer

屬性值

以像素為單位之資料行的寬度。

範例

下列程式碼範例會將 的 DataGridColumnStyle 寬度設定為新的值。


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

適用於

另請參閱