RadGrid for ASP.NET

RadGrid Send comments on this topic.
GridColumnCollection Class
See Also  Members   Example 
Telerik.WebControls Namespace : GridColumnCollection Class


The collection of columns of RadGrid or its tables. Accessible through Columns property of RadGrid and GridTableView (MasterTableView) classes.

Object Model

 

Namespace: Telerik.WebControls
Assembly: RadGrid (in RadGrid.dll)

Syntax

Visual Basic (Declaration) 
Public Class GridColumnCollection 
Visual Basic (Usage)Copy Code
Dim instance As GridColumnCollection
C# 
public class GridColumnCollection 

Example

C#Copy Code
GridBoundColumn boundColumn;
           boundColumn = new GridBoundColumn();
           boundColumn.DataField =
"CustomerID";
           boundColumn.HeaderText =
"CustomerID";
           RadGrid1.MasterTableView.Columns.Add(boundColumn);

           boundColumn =
new GridBoundColumn();
           boundColumn.DataField =
"ContactName";
           boundColumn.HeaderText =
"Contact Name";
           RadGrid1.MasterTableView.Columns.Add(boundColumn);

           RadGrid1.MasterTableView.Columns.Add(
new GridExpandColumn() );
    
Visual BasicCopy Code
Dim boundColumn As GridBoundColumn
boundColumn = New GridBoundColumn()
boundColumn.DataField = "CustomerID"
boundColumn.HeaderText = "CustomerID"
RadGrid1.MasterTableView.Columns.Add(boundColumn)

boundColumn = New GridBoundColumn()
boundColumn.DataField = "ContactName"
boundColumn.HeaderText = "Contact Name"
RadGrid1.MasterTableView.Columns.Add(boundColumn)

RadGrid1.MasterTableView.Columns.Add(New GridExpandColumn())

Remarks

Its items are of the available Grid column types.

Inheritance Hierarchy

System.Object
   Telerik.WebControls.GridColumnCollection

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

Assembly: RadGrid (in RadGrid.dll)

See Also