Skip to main content
A newer version of this page is available. .

GridView.AddUnboundColumn(String, String) Method

Creates an unbound column with the specified name and display caption and opens the Expression Editor to allow an end-user to specify an expression for the column.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v19.2.dll

Declaration

public GridColumn AddUnboundColumn(
    string columnName,
    string caption
)

Parameters

Name Type Description
columnName String

A string to be assigned to the GridColumn.Name property.

caption String

The column’s display caption. This value is assigned to the GridColumn.Caption property.

Returns

Type Description
GridColumn

The created unbound column. null if an end-user didn’t specify an expression for the column.

Remarks

The AddUnboundColumn method creates an unbound column and opens the Expression Editor to allow an end-user to specify an expression for the column. If the user specified an expression via this editor, the column is added to the View. Otherwise, the column is destroyed and the AddUnboundColumn method returns null.

The following properties are set by the AddUnboundColumn method:

To manually invoke the Expression Editor for a column, use ColumnView.ShowUnboundExpressionEditor.

See Also