| Visual Basic (Declaration) | |
|---|---|
Public Overloads Function BeginLayoutUpdate( _ ByVal transactionName As System.String _ ) As ILayoutActions | |
| C# | |
|---|---|
public ILayoutActions BeginLayoutUpdate( System.string transactionName ) | |
Parameters
- transactionName
- The name for the action.
Return Value
An object that allows to modify the layout.This method provides a way to modify the layout. Some actions require round trips to the server. These operations are performed asynchronously in one separate undo unit. All actions that do not require a round trip to the server are considered as one undo unit. If the AutoRefreshGrid property value is
true then the query will be executed at the end of the series. To complete the modification series you should call the Commit method on the returned object. To rollback the modification series you should call the Reject method on the returned object. GrapeCity.ActiveAnalysis.Layout.ILayoutActions inherits the System.IDisposable interface. The System.IDisposable.Dispose method implementation calls Reject automatically if Commit has not been called previously.
The following sample demonstrates how to change the type of a chart and put a measure field onto a shelf in one action.
| C# | Copy Code |
|---|---|
using (ILayoutActions actions = pivotView.BeginLayoutUpdate("Show chart")) { actions.SetMarkingType(MarkingType.Bar) .AppendField("[Measures].[Order Count]", ShelfKind.RowShelf) .Commit(); } | |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2