Category / Section
How to hide header row in SfDataGrid?
1 min read
In SfDataGrid, the header row is rendered with a default height of 50 which is maintained in a property called HeaderRowHeight. However this value can also be customized based on the requirement. In order to hide the header row in SfDataGrid, you need to set the “SfDataGrid.HeaderRowHeight” property value to zero.
Refer the below code example in which the HeaderRowHeight property is set to zero to hide the header row.
SfDataGrid dataGrid = new SfDataGrid(); dataGrid.HeaderRowHeight = 0;
The following screenshot shows the final outcome of execution of the above code with header row hidden.