Back to Devexpress

PivotGridControl.GridLayout Event

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridcontrol-01a24df3.md

latest5.2 KB
Original Source

PivotGridControl.GridLayout Event

Fires after the PivotGridControl’s layout has been changed.

Namespace : DevExpress.Xpf.PivotGrid

Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public event RoutedEventHandler GridLayout
vb
Public Event GridLayout As RoutedEventHandler

Event Data

The GridLayout event's data class is RoutedEventArgs. The following properties provide information specific to this event:

PropertyDescription
HandledGets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.
OriginalSourceGets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.
RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance.
SourceGets or sets a reference to the object that raised the event.

The event data class exposes the following methods:

MethodDescription
InvokeEventHandler(Delegate, Object)When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation.
OnSetSource(Object)When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes.

Remarks

When changing the position of fields, expanding field values or performing other actions that affect the size and position of grid elements, the PivotGridControl’s layout changes. As a result, the GridLayout event is raised.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GridLayout event.

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.

wpf-pivot-grid-define-custom-cell-template-to-performing-data-editing/CS/HowToEditCell/PivotGridEditHelper.cs#L64

csharp
if(newPivot != null) {
    newPivot.GridLayout += OnEditInactive;
    DependencyPropertyDescriptor.FromProperty(PivotGridControl.LeftTopCoordProperty, typeof(PivotGridControl)).AddValueChanged(newPivot, OnEditInactive);

wpf-pivot-grid-define-custom-cell-template-to-performing-data-editing/VB/HowToEditCell/PivotGridEditHelper.vb#L67

vb
If newPivot IsNot Nothing Then
    AddHandler newPivot.GridLayout, AddressOf OnEditInactive
    DependencyPropertyDescriptor.FromProperty(PivotGridControl.LeftTopCoordProperty, GetType(PivotGridControl)).AddValueChanged(newPivot, AddressOf OnEditInactive)

See Also

Save and Restore Layout

PivotGridControl Class

PivotGridControl Members

DevExpress.Xpf.PivotGrid Namespace