New to Telerik UI for .NET MAUI? Start a free 30-day trial
How to Hide Column Headers in a DataGrid for MAUI
Updated on Apr 16, 2026
Environment
| Version | Product | Author |
|---|---|---|
| 13.1.0 | Telerik UI for .NET MAUI DataGrid | Dobrinka Yordanova |
Description
I want to hide the column headers in a DataGrid for MAUI. Is there a way to achieve this?
Solution
To hide the column headers in a DataGrid for .NET MAUI, you can use the ColumnHeaderStyle property and customize the style of the column headers by setting the FontSize to 0 and the Color to Transparent.
Here is an example:
-
If you are using C#, create a new instance of the
DataGridColumnHeaderStyleclass and set the following properties:TextFontSizeto 0FilterIndicatorFontSizeto 0BackgroundColortoColors.TransparentBorderColortoColors.TransparentBorderThicknessto a newThicknesswith a value of 0.
The
HeaderStylecustomization in C#:csharpvar dataGrid = new RadDataGrid(); dataGrid.ItemsSource = new List<Data> { new Data { Country = "India", Capital = "New Delhi"}, new Data { Country = "South Africa", Capital = "Cape Town"}, new Data { Country = "Nigeria", Capital = "Abuja" }, new Data { Country = "Singapore", Capital = "Singapore" } }; dataGrid.AutoGenerateColumns = false; var headerStyle = new Style(typeof(DataGridColumnHeaderAppearance)); headerStyle.Setters.Add(new Setter { Property = DataGridColumnHeaderAppearance.TextFontSizeProperty, Value = 0 }); headerStyle.Setters.Add(new Setter { Property = DataGridColumnHeaderAppearance.FilterIndicatorFontSizeProperty, Value = 0 }); headerStyle.Setters.Add(new Setter { Property = DataGridColumnHeaderAppearance.BackgroundColorProperty, Value = Colors.Transparent }); headerStyle.Setters.Add(new Setter { Property = DataGridColumnHeaderAppearance.BorderColorProperty, Value = Colors.Transparent }); headerStyle.Setters.Add(new Setter { Property = DataGridColumnHeaderAppearance.BorderThicknessProperty, Value = new Thickness(0) }); var column1 = new DataGridTextColumn { PropertyName = "Country" }; column1.HeaderStyle = headerStyle; dataGrid.Columns.Add(column1); -
If you are using XAML code, add the
HeaderStyleproperty to theDataGridTextColumnand set its value to a new instance ofDataGridColumnHeaderStylewith the following properties:BackgroundColorto"Transparent"BorderColorto"Transparent"FilterIndicatorFontSizeto0TextFontSizeto0BorderThicknessto a newThicknesswith a value of 0.
The
HeaderStylecustomization in XAML:xaml<telerik:RadDataGrid> <telerik:RadDataGrid.Columns> <telerik:DataGridTextColumn PropertyName="Country"> <telerik:DataGridTextColumn.HeaderStyle> <Style TargetType="telerik:DataGridColumnHeaderAppearance"> <Setter Property="TextFontSize" Value="0" /> <Setter Property="FilterIndicatorFontSize" Value="0" /> <Setter Property="BackgroundColor" Value="Transparent" /> <Setter Property="BorderColor" Value="Transparent" /> <Setter Property="BorderThickness" Value="0" /> </Style> </telerik:DataGridTextColumn.HeaderStyle> </telerik:DataGridTextColumn> </telerik:RadDataGrid.Columns> </telerik:RadDataGrid>