I have a kendo tool tip that I am updating dynamically depending on a list of checkboxes. Here is the code for the tool tip:
When the tool tip is shown it is immediately refreshed to update the content using the following function:
When the tool tip initially is shown it shows the previous content and then it updates. I understand this it because it is going through my loop on the checked boxes but is there a way to hold off on showing the tooltip until it is updated or is there another event I should be using to update my tool tip?
@(Html.Kendo().Tooltip() .Callout(false) .For("#frontNumberSelected") .Position(TooltipPosition.Right) .Width(200) .ContentHandler("changeToolTip") .Events(e => { e.Show("refreshToolTip"); }))function changeToolTip() { var result = ""; if ($(".dcheck").filter(":checked").length > 0) { var toolTipContent = new Array(); $(":checkbox").filter(":checked").each(function () { toolTipContent.push($(this).val()); }); toolTipContent.sort(); toolTipContent.forEach(function (e) { result = result + e + "<br/>"; }); } else { result = "0 selected" } return result; } function refreshToolTip() { this.refresh(); }When the tool tip initially is shown it shows the previous content and then it updates. I understand this it because it is going through my loop on the checked boxes but is there a way to hold off on showing the tooltip until it is updated or is there another event I should be using to update my tool tip?