We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Change default row height after one row height is changed

Thread ID:

Created:

Updated:

Platform:

Replies:

39468 Jan 9,2006 12:34 PM Jan 10,2006 10:12 AM Windows Forms 2
loading
Tags: GridControl
Hui Zhong
Asked On January 9, 2006 12:34 PM

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.

stanleyj [Syncfusion]
Replied On January 10, 2006 02:13 AM

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

Hui Zhong
Replied On January 10, 2006 10:12 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;