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'm having an issue hiding a GLC column. I have a GDBG with two GLC's. If I hide a GLC column by it's Mapping Name, it is hiding the same column position on the second GLC. I have an example attached.
SASaravanan A Syncfusion Team May 17, 2007 07:27 PM UTC
Hi JMS,
The embedded grid in the GridListControl will maintain the HiddenColumnEntries based on the column index. So whenever you hide any column with a mapping name, it will find the corresponding column index and make an entry in the HiddenColumnEntries collection. And another fact is that all the GridListControl cells will refer to a same GridListControl object and that GridListControl will get populated just before dropdown window opens. This is the reason for the behavior you have seen.
To over come this, you would have to subscribe to the CurrentCellShowingDropDown event. And in that event handler reset all the hidden column and then selectively hide the columns based on the mapping name.
Please try the following code snippet and let me know if this helps. void gridDataBoundGrid1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e) { GridDropDownGridListControlCellRenderer cr = this.gridDataBoundGrid1.CurrentCell.Renderer as GridDropDownGridListControlCellRenderer;
if (cr != null) { //Resetting all the hidden columns int colCount = cr.ListControlPart.Grid.Model.ColCount; cr.ListControlPart.Grid.Model.HideCols.ResetRange(1, colCount);
GridCurrentCell cc = gridDataBoundGrid1.CurrentCell; int field = gridDataBoundGrid1.Binder.ColIndexToField(cc.ColIndex); GridBoundColumn column = gridDataBoundGrid1.Binder.InternalColumns[field];