Back to Devexpress

WinExplorerView.Assign(BaseView, Boolean) Method

windowsforms-devexpress-dot-xtragrid-dot-views-dot-winexplorer-dot-winexplorerview-dot-assign-x28-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-system-dot-boolean-x29.md

latest2.4 KB
Original Source

WinExplorerView.Assign(BaseView, Boolean) Method

Copies all settings from the parameter View to the current View and allows you to specify whether event handlers should be copied as well.

Namespace : DevExpress.XtraGrid.Views.WinExplorer

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
public override void Assign(
    BaseView v,
    bool copyEvents
)
vb
Public Overrides Sub Assign(
    v As BaseView,
    copyEvents As Boolean
)

Parameters

NameTypeDescription
vBaseView

A BaseView object that is the source View to copy settings from.

| | copyEvents | Boolean |

true , to copy event handlers from the source View; otherwise, false.

|

Remarks

Note

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

WinExplorerView Class

WinExplorerView Members

DevExpress.XtraGrid.Views.WinExplorer Namespace