RadGrid for ASP.NET

RadGrid Send comments on this topic.
Columns Property
See Also 
Telerik.WebControls Namespace > GridTableView Class : Columns Property


Gets a collection of GridColumn objects that represent the column fields in a GridTableView control.

  

 

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

Syntax

Visual Basic (Declaration) 
Public Overridable ReadOnly Property Columns As GridColumnCollection
Visual Basic (Usage)Copy Code
Dim instance As GridTableView
Dim value As GridColumnCollection
 
value = instance.Columns
C# 
public virtual GridColumnCollection Columns {get;}

Return Value

A GridColumnCollection that contains all the column fields in the GridTableView control.

Remarks

A column field represents a column in a GridTableView control. The Columns property (collection) is used to store all the explicitly declared column fields that get rendered in the GridTableView control. You can also use the Columns collection to programmatically manage the collection of column fields.

The column fields are displayed in the GridTableView control in the order that the column fields appear in the Columns collection.

To get a list of all columns rendered in the current instance use GridTableView.RenderColumns

Although you can programmatically add column fields to the Columns collection, it is easier to list the column fields declaratively in the GridTableView control and then use the Visible property of each column field to show or hide each column field.

If the Visible property of a column field is set to false, the column is not displayed in the GridTableView control and the data for the column does not make a round trip to the client. If you want the data for a column that is not visible to make a round trip, add the field name to the DataKeyNames property.

This property can be managed programmatically or by Property Builder (IDE designer).

Requirements

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

See Also