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.

Set Maximum Row Height

Thread ID:

Created:

Updated:

Platform:

Replies:

34031 Aug 31,2005 11:51 AM Aug 31,2005 12:30 PM Windows Forms 3
loading
Tags: GridControl
Jose Lacson
Asked On August 31, 2005 11:51 AM

Is there a way to set a maximum row hieght for the grid?

Administrator [Syncfusion]
Replied On August 31, 2005 12:03 PM

You can handle the grid.ResizingRows event and limit the size there.
private void gridControl1_ResizingRows(object sender, GridResizingRowsEventArgs e)
{
	if(e.Height > 40)
		e.Cancel = true;
}

Jose Lacson
Replied On August 31, 2005 12:15 PM

How about when the resize occurs during rowheights.resizetofit, is there an event to set the maximum row height? >Is there a way to set a maximum row hieght for the grid?

Jose Lacson
Replied On August 31, 2005 12:30 PM

Found something, don''t know if this is the most elegant way to do it. Private Sub m_oVGrid_RowHeightsChanging(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridRowColSizeChangingEventArgs) Handles m_oVGrid.RowHeightsChanging Dim i As Integer For i = e.Values.GetLowerBound(0) To e.Values.GetUpperBound(0) If e.Values(i) > 150 Then e.Values(i) = 150 End If Next End Sub if there is a better way, i would appreciate it. > >How about when the resize occurs during rowheights.resizetofit, is there an event to set the maximum row height? > >>Is there a way to set a maximum row hieght for the grid?

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.

;