You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/datagrid/cell.md
+245Lines changed: 245 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -764,6 +764,251 @@ The following example demonstrates, how to set the [ClipMode](https://help.syncf
764
764
765
765
The Syncfusion Blazor DataGrid allows you to display information about the Grid columns to the user when they hover over them with the mouse.
766
766
767
+
### Show tooltip
768
+
769
+
The Syncfusion Blazor DataGrid provides a built-in feature to display tooltips when hovering over header and content cells. You can enable this feature by setting the `ShowTooltip` property to **true** in the DataGrid.
770
+
By default, it shows the cell value for both header and content cells. For special types like templates, it displays the row data of the corresponding cells.
771
+
772
+
The following example demonstrates, how to set the `ShowTooltip` property in the DataGrid.
The Syncfusion Blazor DataGrid component provides a built-in option to customize tooltip content for both header and content cells. This can be achieved using the `TooltipTemplate` property, which accepts a `RenderFragment` under the `GridTemplates` component.
850
+
851
+
This feature allows you to display additional information about columns when users hover over them, enhancing the clarity and usability of the DataGrid.
852
+
Tooltip customization is supported through the `TooltipTemplateContext`, which provides access to the following built-in properties:
853
+
<ul>
854
+
<li><strong>Value</strong> – Displays the content of the hovered cell: the column name for header cells or the cell value for content cells.</li>
855
+
<li><strong>RowIndex</strong> – Indicates the row number of the hovered cell. Returns -1 for header cells.</li>
856
+
<li><strong>ColumnIndex</strong> – Indicates the column number of the hovered cell.</li>
857
+
<li><strong>Data</strong> – Provides the full data object of the hovered row. Not available for header cells.</li>
858
+
<li><strong>Column</strong> – Contains metadata about the column, such as the field name and formatting.</li>
859
+
</ul>
860
+
861
+
The following sample demonstrates a custom tooltip implementation using the `TooltipTemplate` in the DataGrid. The tooltip content is styled and includes interactive elements such as formatted text, icons, and contextual information to improve the overall user experience.
> By default, custom tooltips will be displayed if the `ShowTooltip` property is set to **true**.
1011
+
767
1012
### Display custom tooltip for columns
768
1013
769
1014
The Syncfusion Blazor DataGrid provides a feature to display custom tooltips for its columns using the [SfTooltip](https://blazor.syncfusion.com/documentation/tooltip/getting-started). This allows you to provide additional information about the columns when the user hovers over them.
0 commit comments