DataSourceControl.IListSource.GetList 方法

定義

取得一份可作為資料清單來源的資料來源控制清單。

 virtual System::Collections::IList ^ System.ComponentModel.IListSource.GetList() = System::ComponentModel::IListSource::GetList;
System.Collections.IList IListSource.GetList();
abstract member System.ComponentModel.IListSource.GetList : unit -> System.Collections.IList
override this.System.ComponentModel.IListSource.GetList : unit -> System.Collections.IList
Function GetList () As IList Implements IListSource.GetList

傳回

IList 組可用作資料清單來源的資料來源控制。

實作

備註

此方法用於擷取一組可作為資料來源的物件。 資料來源控制項將其資料清單封裝為 DataSourceView 物件;因此,當與一個或多個 DataSourceView 物件相關聯時, DataSourceControl 控制項代表一個清單的原始物件,而方法則回傳 IList 一個元素的集合,也就是 自身 DataSourceControl

此方法呼叫靜態 ListSourceHelper.GetList 方法,以擷取 IList 可用作資料來源的物件集合。 該 ListSourceHelper 類別判斷是否 GetViewNames 回傳一個有效的檢視名稱集合。 如果有,類別會 ListSourceHelper 回傳一個 IList 元素集合,也就是 DataSourceControl 控制項。 若 GetViewNames 返回 null,即該類別的預設實作 DataSourceControlListSourceHelper 該類別也會回傳 null

適用於

另請參閱