| 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. All operations performed on the returned object are considered as one undo/redo unit. If the AutoRefreshGrid property value is true then the query will be executed only at the end of the series. To complete the modification series you should call the GrapeCity.ActiveAnalysis.Layout.ILayoutActions.Commit method on the returned object. To rollback the modification series you should call the GrapeCity.ActiveAnalysis.Layout.ILayoutActions.Reject method on the returned object. GrapeCity.ActiveAnalysis.Layout.ILayoutActions inherits the System.IDisposable interface. The System.IDisposable.Dispose method implementation calls GrapeCity.ActiveAnalysis.Layout.ILayoutActions.Reject automatically if GrapeCity.ActiveAnalysis.Layout.ILayoutActions.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