Export (0) Print
Expand All

DetailsView.CreateChildControls Method (IEnumerable, Boolean)

Creates the control hierarchy used to render the DetailsView control.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

protected override int CreateChildControls (
	IEnumerable dataSource,
	bool dataBinding
)
protected int CreateChildControls (
	IEnumerable dataSource, 
	boolean dataBinding
)
protected override function CreateChildControls (
	dataSource : IEnumerable, 
	dataBinding : boolean
) : int
Not applicable.

Parameters

dataSource

An IEnumerable that represents the data source for the DetailsView control.

dataBinding

true to indicate that this method is being called during data binding; otherwise, false.

Return Value

The number of items in the data source.

Exception typeCondition

HttpException

dataSource returns a null DataSourceView.

- or -

dataSource is not an ICollection and cannot return a total row count.

- or -

dataBinding is false and dataSource does not implement the ICollection interface.

- or -

dataSource does not implement the ICollection interface and AllowPaging is set to true.

The CreateChildControls method is a helper method called by the DetailsView control to create the control hierarchy for the control.

Notes to Inheritors: When extending the DetailsView class, you can override this method to create your own control hierarchy.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft