Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ShowHeader parameter for RadzenDataGrid component #1882

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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