Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BandedGridView.Assign(BaseView, Boolean) Method

Copies properties and, optionally, event handlers from the View passed as a parameter.

Namespace: DevExpress.XtraGrid.Views.BandedGrid

Assembly: DevExpress.XtraGrid.v24.2.dll

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

#Declaration

public override void Assign(
    BaseView v,
    bool copyEvents
)

#Parameters

Name Type Description
v BaseView

A BaseView descendant representing a View whose properties and event handlers are copied. If null (Nothing in Visual Basic), the method does nothing.

copyEvents Boolean

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

#Remarks

This method calls the base GridView.Assign method and then copies the properties and event handlers specific to the BandedGridView class. Note that the current View’s column collection is cleared before copying columns.

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