BaseView.Assign(BaseView, Boolean) Method
Copies the settings of a View object to the current one.
Namespace: DevExpress.XtraGrid.Views.Base
Assembly: DevExpress.XtraGrid.v24.2.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
v | Base |
A Base |
copy |
Boolean | true if event handlers assigned to the source Base |
#Remarks
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.
Note
If you copy settings to a grid control’s View before this grid’s data source is initialized, certain column settings (e.
- Set the target grid’s data source after the Assign method is called.
- Call the target View’s View.
Data Controller. Re Populate Columns method after the Assign method is called.
More details can be found in this support ticket.