The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
ADAdministrator Syncfusion Team 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.
ADAdministrator Syncfusion Team August 10, 2003 11:01 PM UTC