diff --git a/Radzen.Blazor/RadzenDataGrid.razor b/Radzen.Blazor/RadzenDataGrid.razor index e6417619e20..12e72907e63 100644 --- a/Radzen.Blazor/RadzenDataGrid.razor +++ b/Radzen.Blazor/RadzenDataGrid.razor @@ -21,7 +21,7 @@ @if (AllowGrouping || AllowColumnPicking) {
EndColumnDropToGroup())> - @if (@HeaderTemplate != null) + @if (@HeaderTemplate != null && ShowHeader) {
@HeaderTemplate @@ -67,7 +67,7 @@ } else { - @if (@HeaderTemplate != null) + @if (@HeaderTemplate != null && ShowHeader) {
diff --git a/Radzen.Blazor/RadzenDataGrid.razor.cs b/Radzen.Blazor/RadzenDataGrid.razor.cs index 76e9d3b8ee6..bd1ed06c7f1 100644 --- a/Radzen.Blazor/RadzenDataGrid.razor.cs +++ b/Radzen.Blazor/RadzenDataGrid.razor.cs @@ -322,11 +322,20 @@ internal void DrawGroupOrDataRows(Microsoft.AspNetCore.Components.Rendering.Rend /// true if DataGrid data cells will follow the header cells structure in composite columns; otherwise, false. [Parameter] public bool AllowCompositeDataCells { get; set; } = false; + /// /// Gets or sets a value indicating whether DataGrid data body show empty message. /// [Parameter] public bool ShowEmptyMessage { get; set; } = true; + + /// + /// Gets or sets value if headers are shown. + /// + /// If headers are shown value. + [Parameter] + public bool ShowHeader { get; set; } = true; + /// /// Gets or sets a value indicating whether DataGrid is responsive. ///