Skip to content
Open
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 Width for the columns
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set the width for the pivot columns

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SathiyathanamSathish As per your suggestion , I changed the title and content from columns to pivot columns


The width of the columns can be changed using the `QueryColWidth` event.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the columns to pivot columns

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SathiyathanamSathish -I have changed columns to pivot columns


Refer the below code snippet to change the width of the 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 > 2)
{
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 > 2 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 Height for the rows
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rabina4363 - Change the header like this "Set the height for the pivot rows".

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SathiyathanamSathish - I changed the header like "Set the height of the pivot rows"


The height of the rows can be changed using the `QueryRowHeight` event.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rabina4363 - rows to pivot rows

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SathiyathanamSathish - I have changed rows to pivot rows


Refer the below code snippet to change the height of the 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.