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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GDBG w/Hidden or zero-width columns (I'm confused)

Thread ID:

Created:

Updated:

Platform:

Replies:

6351 Aug 10,2003 03:54 PM UTC Aug 10,2003 11:01 PM UTC WinForms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 10, 2003 03:54 PM UTC

I have an application with two grids. One is non-daba-bound, the other is a GDBG bound to a DataSet. As the user moves around in the cells of the upper grid, I fetch different data-sets (with different column layouts) and rebind it to the GDBG using the following code: this.followerGrid.BeginUpdate ( ); this.followerGrid.DataSource = ds; this.followerGrid.DataMember = ds.Tables[0].TableName; this.followerGrid.Model.ColWidths.ResizeToFit (sfGrid.GridRangeInfo.Table(), sfGrid.GridResizeToFitOptions.IncludeHeaders | sfGrid.GridResizeToFitOptions.NoShrinkSize ); this.followerGrid.Invalidate ( ); this.followerGrid.EndUpdate ( ); For some reason, when the user shrinks a column width down to nothing, the GDBG seems to "remember" that and when I rebing the GDBG to a new DataSet, it doesn't display all the columns. I cannot figure out what to reset or clear to cause the GDBG to stop hiding/collapsing the size=zero column(s). I tried... this.followerGrid.GridBoundColumns.Clear(); ... prior to assigning the new dataset, but that didn't have any effect. Help?

Administrator [Syncfusion]
Replied On August 10, 2003 05:19 PM UTC

After setting the datasource, try gridDataBoundGrid1.Model.ColWidths.ResetRange(0, this.gridDataBoundGrid1.Model.ColCount); gridDataBoundGrid1.Model.Cols.Hidden.ResetRange(0, this.gridDataBoundGrid1.Model.ColCount); gridDataBoundGrid1.Model.ResetVolatileData(); to see if this resets the resized columns and hidden columns.

Administrator [Syncfusion]
Replied On August 10, 2003 11:01 PM UTC

That did the trick, as usual. Thanks again.

CONFIRMATION

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.

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

;