Skip to content

ES- 914242-User Guide Update regarding Rowheight and ColumnWidth for WF PivotGrid Control-Dev #1069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: development
Choose a base branch
from
40 changes: 40 additions & 0 deletions WindowsForms/Pivot-Grid/Pivot-Columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,43 @@ End Class
{% endhighlight %}

{% endtabs %}

## Set the width for the pivot columns

The width of the pivot columns can be changed using the `QueryColWidth` event.

Refer the below code snippet to change the width of the pivot columns by using the column index.

{% tabs %}

{% highlight c# %}

pivotGridControl1.TableModel.QueryColWidth += TableModel_QueryColWidth;

private void TableModel_QueryColWidth(object sender, Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs e)
{
if (e.Index == 4)
{
e.Size = 150;
e.Handled = true;
}
}

{% endhighlight %}

{% highlight vb %}

AddHandler pivotGridControl1.TableModel.QueryColWidth, AddressOf TableModel_QueryColWidth

Private Sub TableModel_QueryColWidth(ByVal sender As Object,ByVal e As Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs)
If e.Index == 4 Then
e.Size = 150
e.Handled = True
End If
End Sub

{% endhighlight %}

{% endtabs %}

![Changing Row height in Winforms PivotGrid Control](Pivot-Columns_images/column.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions WindowsForms/Pivot-Grid/Pivot-Rows.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,44 @@ End Class
{% endhighlight %}

{% endtabs %}

## Set the height for the pivot rows

The height of the pivot rows can be changed using the `QueryRowHeight` event.

Refer the below code snippet to change the height of the pivot rows by using the row index.

{% tabs %}

{% highlight c# %}

pivotGridControl1.TableModel.QueryRowHeight += TableModel_QueryRowHeight;

private void TableModel_QueryRowHeight(object sender, Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs e)
{
if (e.Index > 2)
{
e.Size = 16;
e.Handled = true;
}
}

{% endhighlight %}

{% highlight vb %}

AddHandler pivotGridControl1.TableModel.QueryRowHeight, AddressOf TableModel_QueryRowHeight

Private Sub TableModel_QueryRowHeight(ByVal sender As Object,ByVal e As GridRowColSizeEventArgs)
If e.Index > 2 Then
e.Size = 16
e.Handled = True
End If
End Sub

{% endhighlight %}

{% endtabs %}

![Changing Row height in Winforms PivotGrid Control](Pivot-Rows_images/Height.png)

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.