DesignerHierarchicalDataSourceView.GetDesignTimeData(Boolean) 方法
定义
生成与相关数据源控件的架构匹配的设计时数据,并返回一个值,该值指示数据是示例数据还是真实数据。Generates design-time data that matches the schema of the associated data source control and returns a value indicating whether the data is sample or real data.
public:
virtual System::Web::UI::IHierarchicalEnumerable ^ GetDesignTimeData([Runtime::InteropServices::Out] bool % isSampleData);
public virtual System.Web.UI.IHierarchicalEnumerable GetDesignTimeData (out bool isSampleData);
abstract member GetDesignTimeData : bool -> System.Web.UI.IHierarchicalEnumerable
override this.GetDesignTimeData : bool -> System.Web.UI.IHierarchicalEnumerable
Public Overridable Function GetDesignTimeData (ByRef isSampleData As Boolean) As IHierarchicalEnumerable
参数
- isSampleData
- Boolean
true 指示返回的数据是示例数据;false 则指示返回的数据是实时数据。true to indicate the returned data is sample data; false to indicate the returned data is live data.
返回
此实现始终返回 null。This implementation always returns null.
注解
GetDesignTimeData方法应提供数据的设计时版本,以供关联的数据绑定控件设计器使用。The GetDesignTimeData method should provide a design-time version of data for use by the associated data-bound control designer.
不是预期的,也不建议设计人员在设计时执行实际的数据访问。It is not expected nor recommended that the designer perform actual data access at design time. 相反,设计器应创建与数据源的架构匹配的示例数据。Instead, the designer should create sample data that matches the schema of the data source.