Hi Deepak,
Thanks for using Syncfusion product.
Suggestion1
By default, you can hide the columns by using VisibleColumns property and actual columns are maintaining in Columns(GridColumnDescriptorCollection). So, you can identify those hidden columns by iterating the GridColumnDescriptorCollection. Please refer to the below code example,
Code example
|
//To hide the columns
this.gridGroupingControl1.TableDescriptor.VisibleColumns.Remove("Ship City");
this.gridGroupingControl1.TableDescriptor.VisibleColumns.Remove("Ship Country");
foreach (var column in this.gridGroupingControl1.TableDescriptor.Columns)
{
//To unhide the columns
if (!this.gridGroupingControl1.TableDescriptor.VisibleColumns.Contains(column.Name))
this.gridGroupingControl1.TableDescriptor.VisibleColumns.Add(column.Name);
}
|
Please refer to the below UG and KB link,
Suggestion2
If you hide the column by resizing at run time, column width will be getting 0. So, you can find those hidden columns by checking the Column.Width property. Please refer to the below code example,
Code example
|
foreach (var column in this.gridGroupingControl1.TableDescriptor.Columns)
{
if (column.Width == 0)
column.Width = this.gridGroupingControl1.TableControl.DefaultColWidth;
}
|
Please let us know if you are using different approach to hide the column in GridGroupingControl.
Regards,
Mohanraj G