Hi,
I tried the below , it hides the grouped column values, but the empty column is still present and another problem with this is that the header columns move one step left in place of the hidden column, there by we have header columns that are not insync with the data in the rest of the grid.
Please advice.
Thanks
>Hi Saurabh,
Thanks for using Syncfusion products.
We can hide the column header too, using the below code snippet:
void GridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Web.UI.WebControls.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.TableCellType == Syncfusion.Web.UI.WebControls.Grid.Grouping.GridTableCellType.AlternateRecordFieldCell || e.TableCellIdentity.TableCellType == Syncfusion.Web.UI.WebControls.Grid.Grouping.GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == Syncfusion.Web.UI.WebControls.Grid.Grouping.GridTableCellType.ColumnHeaderCell)
{
if (e.TableCellIdentity.Column.Name == "Name")
{
if(this.GridGroupingControl1.TableDescriptor.GroupedColumns.Contains("Name"))
{
e.Style.CssClass = "display";
e.Handled = true;
}
}
}
}
But we can’t hide it from the GroupDropArea. Please have a look at the sample from the below link:
http://www.syncfusion.com/support/user/uploads/Sample_2245517e.zipPlease let me know if you have any other concerns.
Regards,
Raji