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.

Setting Grid Visible cells

Thread ID:





46598 Jul 17,2006 09:20 AM Jul 17,2006 08:45 PM Windows Forms 1
Tags: Grouping
Ajay Bhalegar
Asked On July 17, 2006 09:20 AM

Hi I want to set minimum of 2-4 rows in grid to be visible always. The problem i am facing is i had the grid anchor property to fill and when i resize manually the rows get resized for the grid is there any way to restrict to display the minimum rows Regards Ajay

Administrator [Syncfusion]
Replied On July 17, 2006 08:45 PM

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


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.