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

ASPxPivotGrid.SaveLayoutToString(PivotGridWebOptionsLayout) Method

Saves the pivot grid layout to the specified string, using the specified settings.

Namespace: DevExpress.Web.ASPxPivotGrid

Assembly: DevExpress.Web.ASPxPivotGrid.v19.2.dll

Declaration

public string SaveLayoutToString(
    PivotGridWebOptionsLayout optionsLayout
)

Parameters

Name Type Description
optionsLayout PivotGridWebOptionsLayout

A PivotGridWebOptionsLayout object that specifies which options should be saved.

Returns

Type Description
String

A String that specifies the string to which the pivot grid layout has been written.

Remarks

Use this SaveLayoutToString method overload to save specific settings of a pivot grid to a string. These settings can be restored later, via the ASPxPivotGrid.LoadLayoutFromString method.

The optionsLayout parameter determines which options should be saved to the string. For the pivot grid control, you can create a PivotGridWebOptionsLayout object, customize it as required, and then pass it, as the optionsLayout parameter. Only options enabled in this object will be saved.

To save all the options, pass null (Nothing in Visual Basic) or the static PivotGridWebOptionsLayout.FullLayout property as the optionsLayout parameter.

The SaveLayoutToString overload without the optionsLayout parameter saves only options specified by the ASPxPivotGrid.OptionsLayout property.

Note

The expansion states of field values are not saved by the SaveLayoutToString method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SaveLayoutToString(PivotGridWebOptionsLayout) 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