AD
Administrator
Syncfusion Team
July 18, 2006 12:45 AM UTC
Since you are using Dock.Fill, then I think you will have to try to avoid the grid''s parent control from sizing too small. Exactly how you go about this depends upon the parent. If it is a form, you can try setting a property.
int minGridHeight = this.gridGroupingControl1.TableModel.RowHeights.GetTotal(0, 5)
+ 2 * SystemInformation.FrameBorderSize.Height
+ SystemInformation.CaptionHeight;
this.MinimumSize = new Size(this.MinimumSize.Width, minGridHeight);
If it is somethelse, you might try hadling a SizeChanged event on the parent and reset the size there. (But this will likely cause flickers as the size gets reset.)
protected override void OnSizeChanged(EventArgs e)
{
int minGridHeight = this.gridGroupingControl1.TableModel.RowHeights.GetTotal(0, 5) + 2;
if (this.ClientSize.Height < minGridHeight)
{
this.ClientSize = new Size(this.ClientSize.Width, minGridHeight);
}
base.OnSizeChanged(e);
}