+ @HeaderTitleContent
+
@if (Grid.SortByAscending.HasValue && IsActiveSortColumn)
{
@@ -146,7 +164,7 @@
{
- @Title
+ @HeaderTitleContent
@if (ColumnOptions is not null && Filtered.GetValueOrDefault() && Grid.ResizeType.HasValue)
{
diff --git a/src/Core/Components/DataGrid/Columns/ColumnBase.razor.cs b/src/Core/Components/DataGrid/Columns/ColumnBase.razor.cs
index 3bcaa0431e..4e5060c87a 100644
--- a/src/Core/Components/DataGrid/Columns/ColumnBase.razor.cs
+++ b/src/Core/Components/DataGrid/Columns/ColumnBase.razor.cs
@@ -83,6 +83,13 @@ public abstract partial class ColumnBase
[Parameter]
public RenderFragment>? HeaderCellItemTemplate { get; set; }
+ ///
+ /// Gets or sets a template for the title content of this column's header cell.
+ /// If not specified, the default header template includes the .
+ ///
+ [Parameter]
+ public RenderFragment>? HeaderCellTitleTemplate { get; set; }
+
///
/// If specified, indicates that this column has this associated options UI. A button to display this
/// UI will be included in the header cell by default.
@@ -221,6 +228,14 @@ protected internal virtual Task OnCellKeyDownAsync(FluentDataGridCell
///
protected internal RenderFragment HeaderContent { get; protected set; }
+ ///
+ /// Gets or sets a that will be rendered for this column's header title.
+ /// This allows derived components to change the header title output. However, derived components are then
+ /// responsible for using within that new output if they want to continue
+ /// respecting that option.
+ ///
+ protected internal RenderFragment HeaderTitleContent { get; protected set; }
+
///
/// Gets a value indicating whether this column should act as sortable if no value was set for the
/// parameter. The default behavior is not to be
@@ -247,6 +262,7 @@ protected void HandleKeyDown(FluentKeyCodeEventArgs e)
public ColumnBase()
{
HeaderContent = RenderDefaultHeaderContent;
+ HeaderTitleContent = RenderDefaultHeaderTitle;
}
private async Task HandleColumnHeaderClickedAsync()