DataGridViewCell.Size DataGridViewCell.Size DataGridViewCell.Size DataGridViewCell.Size Property

定義

取得儲存格的大小。Gets the size of the cell.

public:
 property System::Drawing::Size Size { System::Drawing::Size get(); };
[System.ComponentModel.Browsable(false)]
public System.Drawing.Size Size { get; }
member this.Size : System.Drawing.Size
Public ReadOnly Property Size As Size

屬性值

Size 設定為主控資料列的高度和主控資料行的寬度。A Size set to the owning row's height and the owning column's width.

例外狀況

包含儲存格的資料列是共用的資料列。The row containing the cell is a shared row.

-或--or-

儲存格是資料行行首儲存格。The cell is a column header cell.

備註

如果資料格未與DataGridView控制項相關聯Size ,屬性Size會傳回寬度和高度為-1 的。If the cell is not associated with a DataGridView control, the Size property returns a Size with a width and height of -1.

適用於

另請參閱