This is a migrated thread and some comments may be shown as answers.

How to create a tooltip for Grid column

3 Answers 617 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 25 Jan 2014, 09:13 PM
I have a grid with an image column to show if there is an error or not.  If this is an error, I would like to display a tooltip with a message when the user hovers over the image.  The message would be from c.ErrorMessage.

Is there a sample on how to do this?  I searched and could not find one.

@(Html.Kendo().Grid<GridLineItem>().Name("grid").Columns(columns =>
              {
                    columns.Bound(c => c.ReportName).Title("Status").ClientTemplate(
                        "# if (HasError == true) { #" +
                            "<img src='" + Url.Content("Images/error.png") + "'/>" +
                        "# } else { #" +
                              "<img src='" + Url.Content("Images/success.png") + "'/>" +
                        "# } #"
                    );
                                )

3 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 29 Jan 2014, 08:02 AM
Hi Greg,

I would recommend checking this example, where similar behavior is demonstrated.

Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Francis
Top achievements
Rank 1
answered on 20 Feb 2018, 03:27 PM
How could we not fire the ToolTip when we do an Add New in that column?
0
Stefan
Telerik team
answered on 22 Feb 2018, 08:24 AM
Hello, Francis,

I can suggest checking the following example demonstrating how to show and hide the tooltip based on a condition:

https://docs.telerik.com/kendo-ui/controls/layout/tooltip/how-to/show-on-length-condition

Currently, we have an issue with the ToolTip being shown and hidden multiple times, but the approach shown in the demo in the supported one.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Greg
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Francis
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or