DataSourceControl.IListSource.ContainsListCollection DataSourceControl.IListSource.ContainsListCollection DataSourceControl.IListSource.ContainsListCollection Property


指示資料來源控制項是否與一個或多個資料清單產生關聯。Indicates whether the data source control is associated with one or more lists of data.

property bool System::ComponentModel::IListSource::ContainsListCollection { bool get(); };
bool System.ComponentModel.IListSource.ContainsListCollection { get; }
 ReadOnly Property ContainsListCollection As Boolean Implements IListSource.ContainsListCollection


如果 DataSourceControl 與一個或多個 DataSourceView 物件關聯,則為 true,否則為 falsetrue if the DataSourceControl is associated with one or more DataSourceView objects; otherwise, false.



這個屬性是用來判斷目前的物件是否可以當做一或多個資料清單的來源使用。This property is used to determine whether the current object can be used as a source of one or more lists of data. DataSourceView資料來源控制項會將DataSourceView DataSourceControl其資料清單封裝為物件; 因此, 當與一或多個物件相關聯時, 控制項會代表清單來源物件, 而屬性true會傳回。Data source controls encapsulate their lists of data as DataSourceView objects; therefore, when associated with one or more DataSourceView objects, a DataSourceControl control represents a list source object and the property returns true.

這個屬性會呼叫靜態ListSourceHelper.ContainsListCollection方法, 以判斷目前的資料來源控制項是否可以當做資料來源使用。This property calls the static ListSourceHelper.ContainsListCollection method to determine whether the current data source control can be used as a source of data. 類別會判斷此GetViewNames方法是否會傳回有效的視圖名稱集合。 ListSourceHelperThe ListSourceHelper class determines whether the GetViewNames method returns a valid collection of view names. 如果有的話, 這個屬性true會傳回。If it does, this property returns true. 如果GetViewNames傳回 DataSourceControl , 這是類別的預設實值, 則方法false會傳回。 nullIf GetViewNames returns null, which is the default implementation of the DataSourceControl class, the method returns false.