ST
stanleyj
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
HZ
Hui Zhong
January 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