RowsHiding cause

Is there any way of determining whether a RowsHiding event is caused by a method call or from resizing a row height to 0? I want to prevent rows from being resized to 0, but still allow function calls to hide rows. Thanks, Sue

1 Reply

AD Administrator Syncfusion Team August 5, 2005 09:56 AM UTC

You can handle the ResizingRows event and set a flag there to test later. private bool sizingToZero = false; private void gridControl1_ResizingRows(object sender, GridResizingRowsEventArgs e) { sizingToZero = e.Height == 0; } private void gridControl1_RowsHiding(object sender, GridRowColHidingEventArgs e) { Console.WriteLine(sizingToZero); sizingToZero = false; }

Loader.
Up arrow icon