asp.net.ph

BoundField Constructor

System.Web.UI.WebControls Namespace   BoundField Class


.NET Framework version 2.0

Initializes a new instance of the BoundField class.

[ VB ]
Public Sub New ( )

[ C# ]
public BoundField ( );

[ C++ ]
public: BoundField ( );

[ JScript ]
public function BoundField ( );

Remarks

Use this constructor to initialize a new instance of the BoundField class.

Example

The following example demonstrates how to initialize a new instance of the BoundField class and add it to the Columns collection.

void Page_Init ( Object src, EventArgs e ) {
   // create dynamic column to add to Columns collection.
   BoundField newColumn = new BoundField ( );
   newColumn.HeaderText = "Product Code"; 
   newColumn.DataField = "ProductID";

   // add column to Columns collection.
   myGrid.Columns.AddAt ( 2, newColumn );
}
  C# VB

See Also

BoundField Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph