BaseDataListDesigner.GetDesignTimeDataSource 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
產生一個可在設計時作為資料來源的物件。
多載
| 名稱 | Description |
|---|---|
| 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 from dummy 資料。
另請參閱
適用於
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 from dummy 資料。