ColumnView.Assign(BaseView, Boolean) Method
Copies properties and, optionally, event handlers from another View to the current one.
public override void Assign( BaseView v, bool copyEvents )
Public Overrides Sub Assign( v As BaseView, copyEvents As Boolean )
A BaseView object representing a View whose properties and event handlers are to be copied.
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.