How can I add multiple tooltips on kendo ui grid.

北战南征 提交于 2020-01-06 14:47:46

问题


I want to have different tooltips in different columns on a kendo ui grid. I am examine the example http://dojo.telerik.com/@pfilipov/iGetO/2 but I can't find the way to do it.


回答1:


Do you require Angular syntax as in example? - I don't speak Angular, but here is basic solution where I do not need to.

Dojo example

Also there is content function where you can catch and react according to attributes - in that case Title. So if you need calculate some equation (for example) you can create condition if(title == Tooltip1) and do what you need.




回答2:


You can do like below:

$("#Kendo-grid-div-id").kendoTooltip({
    filter: "td:nth-child(2),td:nth-child(3)", //comma separated multiple columns
    position: "bottom",     //possible values: bottom,top,left,right,center
    content: function(e){
      var content = e.target.html();
      return content;
    }
  }).data("kendoTooltip");

This works for me!!!



来源:https://stackoverflow.com/questions/34403108/how-can-i-add-multiple-tooltips-on-kendo-ui-grid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!