Skip to content

Commit

Permalink
Added ShowHeader parameter for RadzenDataGrid component
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreikaKanareika committed Dec 25, 2024
1 parent 387eacf commit 13009a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Radzen.Blazor/RadzenDataGrid.razor
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@if (AllowGrouping || AllowColumnPicking)
{
<div class="rz-group-header" @onmouseup=@(args => EndColumnDropToGroup())>
@if (@HeaderTemplate != null)
@if (@HeaderTemplate != null && ShowHeader)
{
<div class="rz-custom-header" @onkeydown:stopPropagation>
@HeaderTemplate
Expand Down Expand Up @@ -67,7 +67,7 @@
}
else
{
@if (@HeaderTemplate != null)
@if (@HeaderTemplate != null && ShowHeader)
{
<div class="rz-group-header">
<div class="rz-custom-header" @onkeydown:stopPropagation>
Expand Down
9 changes: 9 additions & 0 deletions Radzen.Blazor/RadzenDataGrid.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,20 @@ internal void DrawGroupOrDataRows(Microsoft.AspNetCore.Components.Rendering.Rend
/// <value><c>true</c> if DataGrid data cells will follow the header cells structure in composite columns; otherwise, <c>false</c>.</value>
[Parameter]
public bool AllowCompositeDataCells { get; set; } = false;

/// <summary>
/// Gets or sets a value indicating whether DataGrid data body show empty message.
/// </summary>
[Parameter]
public bool ShowEmptyMessage { get; set; } = true;

/// <summary>
/// Gets or sets value if headers are shown.
/// </summary>
/// <value>If headers are shown value.</value>
[Parameter]
public bool ShowHeader { get; set; } = true;

/// <summary>
/// Gets or sets a value indicating whether DataGrid is responsive.
/// </summary>
Expand Down

0 comments on commit 13009a0

Please sign in to comment.