DataSourceControl.IListSource.ContainsListCollection 属性

定义

指示数据源控件是否与一个或多个数据列表相关联。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. 如果为, 则此属性返回trueIf it does, this property returns true. 如果GetViewNames DataSourceControl false返回null, 它是类的默认实现, 则该方法返回。If GetViewNames returns null, which is the default implementation of the DataSourceControl class, the method returns false.

适用于

另请参阅