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

Hw do I freeze or lock the height of a row in DGBG

Hi,

Hw do I freeze the height of a row in DGBG? Means I should not allow the user to increase the height of the row.

Thanks,
Raul


3 Replies

HA haneefm Syncfusion Team April 23, 2007 06:53 PM UTC

Hi Rahul,

One way you do this by handling the ResizingRows event of the grid and set e.Cancel to true. Here is a code snippet that show you "How to prevent the user from changing the row height in a grid?".

//Form load..
this.grid1.ResizingRows +=new GridResizingRowsEventHandler(grid1_ResizingRows);

private void grid1_ResizingRows(object sender, GridResizingRowsEventArgs e)
{
if(e.Rows.Bottom == 2)
e.Cancel = true;
}

Best regards,
Haneef


RA Raul April 23, 2007 06:59 PM UTC

hey Haneef,

Thanks for yr quick reply, howvever the above code snippet is not working..I'am still able to resize rows height..


HA haneefm Syncfusion Team April 23, 2007 07:24 PM UTC

Hi Rahul,

Here is a minimal sample that shows you "How to prevent the user from changing the row height in a grid?".
DGBGPreventRowHeight.zip

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon