Back to Devexpress

PivotGridControl.LayoutChanged() Method

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-292f65e8.md

latest4.3 KB
Original Source

PivotGridControl.LayoutChanged() Method

Updates a PivotGridControl.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public void LayoutChanged()
vb
Public Sub LayoutChanged

Remarks

The LayoutChanged method recalculates all of the Pivot Grid Control’s graphical information and redraws it. This method is called automatically when changes are applied to the control (for example, when the field width is changed, etc). This method can also be called manually when the Pivot Grid Control needs to be updated. This can be done when you need the control to be updated in response to custom actions that don’t lead to automatic updating.

The following code snippets (auto-collected from DevExpress Examples) contain references to the LayoutChanged() 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.

winforms-pivot-grid-hide-specific-columns-and-rows/CS/Form1.cs#L49

csharp
void radioGroup1_SelectedIndexChanged(object sender, EventArgs e) {
    this.pivotGridControl1.LayoutChanged();
}

winforms-pivot-split-field-value-cells/CS/Form1.cs#L55

csharp
void radioGroup1_SelectedIndexChanged(object sender, EventArgs e) {
    this.pivotGridControl1.LayoutChanged();
}

winforms-pivot-grid-hide-empty-columns-and-rows/CS/Form1.cs#L63

csharp
void radioGroup1_SelectedIndexChanged(object sender, EventArgs e) {
    this.pivotGridControl1.LayoutChanged();
    pivotGridControl1.BestFit();

winforms-pivot-grid-hide-specific-columns-and-rows/VB/Form1.vb#L57

vb
ByVal e As EventArgs) Handles radioGroup1.SelectedIndexChanged
Me.pivotGridControl1.LayoutChanged()
pivotGridControl1.BestFit()

winforms-pivot-split-field-value-cells/VB/Form1.vb#L57

vb
ByVal e As EventArgs) Handles radioGroup1.SelectedIndexChanged
    Me.pivotGridControl1.LayoutChanged()
End Sub

winforms-pivot-grid-hide-empty-columns-and-rows/VB/Form1.vb#L73

vb
Private Sub radioGroup1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
    pivotGridControl1.LayoutChanged()
    pivotGridControl1.BestFit()

See Also

BeginUpdate()

EndUpdate()

GridLayout

RefreshData()

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace