BaseView.Assign(BaseView, Boolean) Method

Copies the settings of a View object to the current one.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v21.1.dll


public virtual void Assign(
    BaseView v,
    bool copyEvents


Name Type Description
v BaseView

A BaseView object or descendant representing the source of the operation.

copyEvents Boolean

true if event handlers assigned to the source BaseView object should be assigned to the corresponding events of the destination View object; otherwise, false.


The Assign method is used to copy the settings of the BaseView object specified by the v parameter to the current View object. This method copies public properties of the source View object and, if the copyEvents parameter is true, the event handlers assigned. This makes it possible to have several View objects with the same behavior and appearance.

Note that the Assign method calls the BaseView.BeginUpdate and BaseView.EndUpdate methods before and after copying settings. Thus, you don’t need to call them manually.

Descendant Views override this method to implement proper assignment.

See Also