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.v20.1.dll

Declaration

public GridColumn AddUnboundColumn(
    string columnName,
    string caption
)
Public Function AddUnboundColumn(
    columnName As String,
    caption As String
) As GridColumn

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