BaseDataListDesigner.GetDesignTimeDataSource 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
生成可在设计时用作数据源的对象。
重载
| 名称 | 说明 |
|---|---|
| GetDesignTimeDataSource(Int32, Boolean) |
生成可在设计时用作数据源的对象。 |
| GetDesignTimeDataSource(IEnumerable, Int32, Boolean) |
生成可在设计时用作数据源的对象。 |
GetDesignTimeDataSource(Int32, Boolean)
生成可在设计时用作数据源的对象。
protected:
System::Collections::IEnumerable ^ GetDesignTimeDataSource(int minimumRows, [Runtime::InteropServices::Out] bool % dummyDataSource);
protected System.Collections.IEnumerable GetDesignTimeDataSource(int minimumRows, out bool dummyDataSource);
member this.GetDesignTimeDataSource : int * bool -> System.Collections.IEnumerable
Protected Function GetDesignTimeDataSource (minimumRows As Integer, ByRef dummyDataSource As Boolean) As IEnumerable
参数
- minimumRows
- Int32
数据源应包含的示例数据的最小行数。
- dummyDataSource
- Boolean
true 如果返回的数据源包含虚拟数据,则为 ; false 如果返回的数据源包含来自实际数据源的数据,则为 。
返回
实现 IEnumerable 接口的对象,该接口用作在设计时使用的数据源。
注解
该方法BaseDataListDesigner.GetDesignTimeDataSource尝试从数据源构造DataTable由属性DataSource定义的DataMember对象。 如果无法执行此操作,它将从虚拟数据创建一个 DataTable 。
另请参阅
适用于
GetDesignTimeDataSource(IEnumerable, Int32, Boolean)
生成可在设计时用作数据源的对象。
protected:
System::Collections::IEnumerable ^ GetDesignTimeDataSource(System::Collections::IEnumerable ^ selectedDataSource, int minimumRows, [Runtime::InteropServices::Out] bool % dummyDataSource);
protected System.Collections.IEnumerable GetDesignTimeDataSource(System.Collections.IEnumerable selectedDataSource, int minimumRows, out bool dummyDataSource);
member this.GetDesignTimeDataSource : System.Collections.IEnumerable * int * bool -> System.Collections.IEnumerable
Protected Function GetDesignTimeDataSource (selectedDataSource As IEnumerable, minimumRows As Integer, ByRef dummyDataSource As Boolean) As IEnumerable
参数
- selectedDataSource
- IEnumerable
实现 IEnumerable 用作数据格式模板的对象。
- minimumRows
- Int32
数据源数据应包含的示例数据的最小行数。
- dummyDataSource
- Boolean
true 如果返回的数据源包含虚拟数据,则为 ; false 如果返回的数据源包含来自实际数据源的数据,则为 。
返回
实现 IEnumerable 接口的对象,该接口用作在设计时使用的数据源。
注解
该方法BaseDataListDesigner.GetDesignTimeDataSource尝试从参数指定的DataTable数据源构造selectedDataSource对象。 如果无法执行此操作,它将从虚拟数据创建一个 DataTable 。