Skip to main content
A newer version of this page is available. .

GridOptionsView.Assign(BaseOptions) Method

Copies all settings from the options object passed as a parameter.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v19.2.dll

Declaration

public override void Assign(
    BaseOptions options
)

Parameters

Name Type Description
options BaseOptions

A BaseOptions descendant whose settings are assigned to the current object.

Remarks

The Assign method is useful if you need to have the same or slightly different options in several Views. It enables you to set the options once and then copy them to a number of Views.

Most commonly, you will use the Assign method to copy settings from one GridOptionsView object to another. The parameter is the source object. The caller is the destination object.

Note: the parameter can be any BaseOptions descendant. The Assign method copies only those properties that are common to both the source and destination objects. So you could copy a Banded Grid View’s View options to a Grid View. You will, of course, have to pass a BandedGridOptionsView object as the parameter.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Assign(BaseOptions) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also