Hello,
I have a GridGrouping Control bound to a DataSet having a DataRelation object. I would like to show the groups without any header rows AT ALL, I just want to view the data without any headers, for both the parent and the Child tables, how is this possible?
Thank you for your help
AD
Administrator
Syncfusion Team
March 6, 2006 03:21 PM UTC
Hi Driss,
The visiblity of the column/row headers for parentTable and child table can be
controlled by the following ways either in designer property setting or in code.
a)Hiding Column Headers
//The visiblity of the column headers for parentTable can be controlled by
ShowColumnHeaders property in TopLevelGroupOptions settings
this.GridGroupingControl1.TopLevelGroupOptions.ShowColumnHeaders = false;
//The visiblity of the ColumnHeader for Nested tables can be controlled by
ShowColumnHeaders property in NestedTableGroupOptions
this.GridGroupingControl1.NestedTableGroupOptions.ShowColumnHeaders = false;
b)Hiding Rowheaders
//The visibility of the Row headers for a particular table can be controlled by the
ShowRowHeader property in the TableOptions settings.
this.GridGroupingControl1.TableOptions.ShowRowHeader = false;
Best Regards,
A.Sivakumar
KR
Kumar Ramdurgkar
December 29, 2010 09:06 PM UTC
I am looking to do exactly the same thing in a WPF Datagrid
I am using the latest version 8.4.0.10
Any suggestions please?
Thanks,
Kumar Ramdurgkar
KA
Kamalakannan A
Syncfusion Team
January 19, 2011 12:22 PM UTC
Hi Driss,
WPF grid data control does not have any property to hide the header columns and header rows. However we can achieve this by using he following work around. This will hide the header cells in the column and row while expanding.
[Code snippet] [C#]
void dataGrid_Loaded(object sender, RoutedEventArgs e)
{
this.dataGrid.Model.Table.RecordExpanded += new EventHandler>(Table_RecordExpanded);
}
void Table_RecordExpanded(object sender, GridDataValueEventArgs e)
{
GridDataChildTableModel child = e.Value.ChildModels[0];
child.RowHeights[0] = 0;
child.ColumnWidths[0] = 0;
}
Please let us know if any queries.
Regards,
Kamal.