This documentation is archived and is not being maintained.

DataGrid.CreateControlHierarchy Method

Creates the control hierarchy that is used to render the DataGrid.

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

protected override void CreateControlHierarchy (
	bool useDataSource
)
protected void CreateControlHierarchy (
	boolean useDataSource
)
protected override function CreateControlHierarchy (
	useDataSource : boolean
)
Not applicable.

Parameters

useDataSource

Whether to use the data source to generate columns automatically or to use saved state.

Exception typeCondition

HttpException

useDataSource is true, the value of VirtualItemCount is not set, and the selected data source does not implement the ICollection interface.

- or -

useDataSource is true and the data source has an invalid CurrentPageIndex property.

This implementation assumes that all the children in the controls collection have already been cleared.

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, 1.1, 1.0
Show: