From a7daccfd25715f92788648810b59bf9737d3b11b Mon Sep 17 00:00:00 2001 From: Paul Welter Date: Thu, 15 Aug 2024 21:17:30 -0500 Subject: [PATCH] improve footer template in datagrid --- src/LoreSoft.Blazor.Controls/Data/DataColumn.cs | 2 +- src/LoreSoft.Blazor.Controls/Data/DataGrid.razor | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/LoreSoft.Blazor.Controls/Data/DataColumn.cs b/src/LoreSoft.Blazor.Controls/Data/DataColumn.cs index df0d270..956af14 100644 --- a/src/LoreSoft.Blazor.Controls/Data/DataColumn.cs +++ b/src/LoreSoft.Blazor.Controls/Data/DataColumn.cs @@ -88,7 +88,7 @@ public class DataColumn : ComponentBase public RenderFragment Template { get; set; } [Parameter] - public RenderFragment FooterTemplate { get; set; } + public RenderFragment> FooterTemplate { get; set; } [Parameter] public RenderFragment FilterTemplate { get; set; } diff --git a/src/LoreSoft.Blazor.Controls/Data/DataGrid.razor b/src/LoreSoft.Blazor.Controls/Data/DataGrid.razor index 47da973..eca1a14 100644 --- a/src/LoreSoft.Blazor.Controls/Data/DataGrid.razor +++ b/src/LoreSoft.Blazor.Controls/Data/DataGrid.razor @@ -242,12 +242,20 @@ { + @if (DetailTemplate != null) + { + + } + @if (Selectable) + { + + } @foreach (var column in VisibleColumns) { @if (column.FooterTemplate != null) { - @column.FooterTemplate + @column.FooterTemplate(View) } }