diff --git a/examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml b/examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml
index 3ce340929a..0407df2a43 100644
--- a/examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml
+++ b/examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml
@@ -1204,7 +1204,12 @@
- Gets or sets the value to be used as the tooltip and aria-label in this column's cells
+ Gets or sets the function that defines the value to be used as the tooltip and aria-label in this column's cells
+
+
+
+
+ Gets or sets the tooltip text for the column header.
diff --git a/examples/Demo/Shared/Pages/DataGrid/Examples/DataGridTypical.razor b/examples/Demo/Shared/Pages/DataGrid/Examples/DataGridTypical.razor
index c3a7fd6db0..84195fa744 100644
--- a/examples/Demo/Shared/Pages/DataGrid/Examples/DataGridTypical.razor
+++ b/examples/Demo/Shared/Pages/DataGrid/Examples/DataGridTypical.razor
@@ -14,7 +14,7 @@
HeaderCellAsButtonWithMenu="true"
Style="height: 405px;overflow:auto;"
ColumnResizeLabels="@customLabels">
-
+
diff --git a/src/Core/Components/DataGrid/Columns/ColumnBase.razor b/src/Core/Components/DataGrid/Columns/ColumnBase.razor
index 9d7475b32a..a9e18748bc 100644
--- a/src/Core/Components/DataGrid/Columns/ColumnBase.razor
+++ b/src/Core/Components/DataGrid/Columns/ColumnBase.razor
@@ -15,7 +15,7 @@
}
else if (Grid.HeaderCellAsButtonWithMenu)
{
- string? tooltip = Tooltip ? Title : null;
+ string? tooltip = Tooltip ? (HeaderTooltip ?? Title) : null;
Grid.RemoveSortByColumnAsync(this))" @oncontextmenu:preventDefault>
@@ -62,7 +62,7 @@
}
else
{
- string? tooltip = Tooltip ? Title : null;
+ string? tooltip = Tooltip ? (HeaderTooltip ?? Title) : null;
@if (Align == Align.Start || Align == Align.Center)
{
diff --git a/src/Core/Components/DataGrid/Columns/ColumnBase.razor.cs b/src/Core/Components/DataGrid/Columns/ColumnBase.razor.cs
index f186b6ac45..def61a9c7d 100644
--- a/src/Core/Components/DataGrid/Columns/ColumnBase.razor.cs
+++ b/src/Core/Components/DataGrid/Columns/ColumnBase.razor.cs
@@ -55,11 +55,17 @@ public abstract partial class ColumnBase
public bool Tooltip { get; set; } = false;
///
- /// Gets or sets the value to be used as the tooltip and aria-label in this column's cells
+ /// Gets or sets the function that defines the value to be used as the tooltip and aria-label in this column's cells
///
[Parameter]
public Func? TooltipText { get; set; }
+ ///
+ /// Gets or sets the tooltip text for the column header.
+ ///
+ [Parameter]
+ public string? HeaderTooltip { get; set; }
+
///
/// Gets or sets an optional template for this column's header cell.
/// If not specified, the default header template includes the along with any applicable sort indicators and options buttons.