System.Web.UI.Design.DesignTimeData.CreateSampleDataTable Method

Creates a sample System.Data.DataTable object with the same schema as the provided data.

Syntax

public static System.Data.DataTable CreateSampleDataTable (IEnumerable referenceData)

Parameters

referenceData
A data source with the desired schema to use as the format for the sample System.Data.DataTable object.

Returns

A System.Data.DataTable object that contains columns with the same names and data types as the provided referenceData.

Remarks

The data types that can be created are the primitive types, such as number, string, and date types. Any other types are replaced by columns of type String. The calling designer component can call the DesignTimeData.GetDesignTimeDataSource(System.Data.DataTable, int) method to add rows of data to the resulting table.

Requirements

Namespace: System.Web.UI.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0