DataGridViewRow.CreateCellsInstance 方法

定義

根據這個資料列建構新的儲存格集合。

protected:
 virtual System::Windows::Forms::DataGridViewCellCollection ^ CreateCellsInstance();
protected virtual System.Windows.Forms.DataGridViewCellCollection CreateCellsInstance ();
abstract member CreateCellsInstance : unit -> System.Windows.Forms.DataGridViewCellCollection
override this.CreateCellsInstance : unit -> System.Windows.Forms.DataGridViewCellCollection
Protected Overridable Function CreateCellsInstance () As DataGridViewCellCollection

傳回

DataGridViewCellCollection

新建立的 DataGridViewCellCollection

備註

這個方法會建立空 DataGridViewCellCollectionCount ,並將 屬性設定為 0。

給繼承者的注意事項

一般而言,衍生類別應該實作自己的方法版本, CreateCellsInstance() 而不是呼叫基類版本。

適用於

另請參閱