Skip to main content

GridColumnCollection Class

A grid’s column collection.

Namespace: DevExpress.Mobile.DataGrid

Assembly: DevExpress.Mobile.Grid.v18.2.dll

Declaration

public class GridColumnCollection :
    ObservableCollection<GridColumn>

The following members return GridColumnCollection objects:

Remarks

Important

This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.

The grid stores its columns within the GridControl.Columns collection. The GridColumnCollection class provides methods that can be used to add, delete, or access individual columns and perform other common collection management tasks. Individual columns are represented by the GridColumn class descendants and can be accessed by their field name or using indexed notation.

Example

This example shows how to create and customize grid columns for displaying and editing data of different types (text, numbers, dates and Boolean values). The specified collection contains columns bound to the data source fields (Product.Name, Product.UnitPrice, Quantity, Date and Shipped) and one unbound column (Total) displaying data values calculated according to a formula based on the values of other columns.

The image below illustrates the result.

Grid_GettingStarted_Lesson2_Result_iOS

Grid_GettingStarted_Lesson2_Result_Android_Dark

Inheritance

See Also