javascript - Kendo UI - Tooltip in a grid -


I am trying to create a tooltip for my grid like this:

  KendoTooltip ({autoHide: true, showOn: "mouseenter", width: 125, height: 125, position: "true", filter: $ ("grid-content a.hasTooltip", content: cando ("# grid"). ".k-grid-content a.hasTooltip" .template ($ ("# storeTerritory") .HTML ())});   

Template definition:

  & lt; script type = "text / x-kendo-template" id = "storeTerritory"> 
#for (var i = 0; i & lt; Territories.length; i ++) {# #if (state! = 'Null' and territories! = '') {# & Lt; p & gt; # regions = [i] .TerritoryDescription # & lt; / p & gt; #} and {# & lt; p & gt; Notification is unavailable & lt; / p & gt; #} # #} # & lt; / div & gt; & lt; / Script> I have set a sample here:

I get a reference error: area in the console error is not defined I'm putting a mouse on 'Wilton'

Let's assume that I want to change the contents of the template with the archive HTML storeTerritory Tooltip then appears:

    

What can be the problem?

The problem is that there is no model with tooltip; To do what you want, you have to create the content using the function:

  $ ("# grid"). KendoTooltip ({autoHide: true, showOn: "mouseenter", width: 125, height: 125, location: "right", filter: ".k-grid-content a.hasTooltip", content: function (e) {var row = $ (e.target) .clostest ("tr"); var dataitem = $ ("# grid"). data ("candgorod"). datetime (line); var template = kendo templates ($ ("# store Territory "). Html (); Return template (datatyme);}});   

(Update)

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -