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. Image for the cookie policy date
close icon

Set Maximum Row Height

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

3 Replies

AD Administrator Syncfusion Team August 31, 2005 04:03 PM UTC

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;
}


JL Jose Lacson August 31, 2005 04:15 PM UTC

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?


JL Jose Lacson August 31, 2005 04:30 PM UTC

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?

Loader.
Live Chat Icon For mobile
Up arrow icon