ColumnView.Assign(BaseView, Boolean) Method

Copies properties and, optionally, event handlers from another View to the current one.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v21.1.dll


public override void Assign(
    BaseView v,
    bool copyEvents


Name Type Description
v BaseView

A BaseView object representing a View whose properties and event handlers are to be copied.

copyEvents Boolean

true if event handlers should be copied; otherwise, false.


The method supports the grid control’s internal infrastructure and is not intended to be called from your code.

If the specified View is a ColumnView object or descendant, the Assign method copies columns and their settings (properties and event handlers). Before copying columns, all columns in the current View are deleted.


If you copy settings to a grid control’s View before this grid’s data source is initialized, certain column settings (e.g., GridColumn.UnboundExpression of unbound columns) do not automatically take effect. You can use one of following solutions to resolve the issue:

  • Set the target grid’s data source after the Assign method is called.
  • Call the target View’s View.DataController.RePopulateColumns method after the Assign method is called.

More details can be found in this support ticket.

See Also