BoundColumn Class
Collapse the table of content
Expand the table of content

BoundColumn Class

A column type for the DataGrid control that is bound to a field in a data source.

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

public ref class BoundColumn : public DataGridColumn
public class BoundColumn extends DataGridColumn
public class BoundColumn extends DataGridColumn

Use the BoundColumn column type in a DataGrid control to display the contents of a field in the data source. The values are listed in a single column. The field is linked to the BoundColumn, so any updates in the data source will reflect in the corresponding cells of the DataGrid control.


This column type is the default for the DataGrid control.

To control appearance of this column, use the style properties of the DataGrid control.

Caution noteCaution

Text is not HTML encoded before it is displayed in the BoundColumn. This makes it possible to embed script within HTML tags in the text. If the values for this column come from user input, be sure to validate the values to reduce security vulnerabilities.

The following example demonstrates how to use a BoundColumn column type in the DataGrid control to display the fields in a data source.

No code example is currently available or this language may not be supported.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

© 2015 Microsoft