The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I want to change the grid default row height after one row height is changed. Where to implement this feature? In the event RowHeightsChanged? Please provide some code. Thanks.
STstanleyj Syncfusion Team January 10, 2006 07:13 AM UTC
Hi Hui,
One way to acheive this is to use the QueryRowHeight handler and set e.Size to the last adjusted height that can be obtained from the ResizingRows handler.
int height;
height = gridControl1.DefaultRowHeight;
private void gridControl1_ResizingRows(object sender, Syncfusion.Windows.Forms.Grid.GridResizingRowsEventArgs e)
{
if(e.Reason == GridResizeCellsReason.MouseUp)
height = e.Height;
this.gridControl1.Invalidate();
}
private void gridControl1_QueryRowHeight(object sender, Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs e)
{
e.Size = height;
e.Handled = true;
}
Best regards,
Stanley
HZHui ZhongJanuary 10, 2006 03:12 PM UTC
Thanks.
>Hi Hui,
>
>One way to acheive this is to use the QueryRowHeight handler and set e.Size to the last adjusted height that can be obtained from the ResizingRows handler.
>
> int height;
> height = gridControl1.DefaultRowHeight;
>
> private void gridControl1_ResizingRows(object sender, Syncfusion.Windows.Forms.Grid.GridResizingRowsEventArgs e)
> {
> if(e.Reason == GridResizeCellsReason.MouseUp)
> height = e.Height;
> this.gridControl1.Invalidate();
> }
>
>
> private void gridControl1_QueryRowHeight(object sender, Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs e)
> {
> e.Size = height;
> e.Handled = true;
> }
>
>Best regards,
>Stanley