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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ResizeToFit including Hidden rows/Cols

Thread ID:





8996 Dec 2,2003 10:06 AM UTC Dec 2,2003 11:30 AM UTC WinForms 1
Tags: GridControl
Asked On December 2, 2003 10:06 AM UTC

Hi Is there any way to have the ResizeToFit methods on ColWidths and RowHeights take hidden rows/cols into account when calculating the sizes for the entire table? Jimmy

Administrator [Syncfusion]
Replied On December 2, 2003 11:30 AM UTC

I don''t really have a good suggestion for this. If you do not have too many hidden rows/columns, then you could just try unhiding them, calling resize to fit, and then rehiding them. Here is some code that resizes the columsn taking into account text in hidden rows. this.grid.BeginUpdate(); bool[] save = this.grid.Model.Rows.Hidden.GetRange(1, this.grid.Model.RowCount); this.grid.Model.Rows.Hidden.ResetRange(1, this.grid.Model.RowCount); this.grid.Model.ColWidths.ResizeToFit(GridRangeInfo.Table()); this.grid.Model.Rows.Hidden.SetRange(1, this.grid.Model.RowCount, save, true); this.grid.EndUpdate(); this.grid.Refresh();


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon