DesignerDataSourceView.GetDesignTimeData(Int32, Boolean) 方法

定义

使用指定的行数生成与关联数据源控件的架构相匹配的设计时数据,以指示其返回示例数据还是实时数据。Generates design-time data that matches the schema of the associated data source control using the specified number of rows, indicating whether it is returning sample data or real data.

public:
 virtual System::Collections::IEnumerable ^ GetDesignTimeData(int minimumRows, [Runtime::InteropServices::Out] bool % isSampleData);
public virtual System.Collections.IEnumerable GetDesignTimeData (int minimumRows, out bool isSampleData);
abstract member GetDesignTimeData : int * bool -> System.Collections.IEnumerable
override this.GetDesignTimeData : int * bool -> System.Collections.IEnumerable
Public Overridable Function GetDesignTimeData (minimumRows As Integer, ByRef isSampleData As Boolean) As IEnumerable

参数

minimumRows
Int32

要返回的最小行数。The minimum number of rows to return.

isSampleData
Boolean

true 指示返回的数据为示例数据;false 指示返回的数据为实时数据。true to indicate that the returned data is sample data; false to indicate that the returned data is live data.

返回

包含要在设计时显示的数据的 DataSourceView 对象。A DataSourceView object containing data to display at design time.

示例

有关将GetDesignTimeData方法与视图、架构和数据源设计器结合使用的完整示例,请参见DataSourceDesignerFor a complete example of using the GetDesignTimeData method with views, schemas, and a data source designer, see DataSourceDesigner.

适用于

另请参阅