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

Add tooltip to tree node

3 Answers 657 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ran
Top achievements
Rank 1
Ran asked on 05 Jul 2016, 09:03 AM

Hi,

attached my example:

http://dojo.telerik.com/@idoglik6/usIro

What I'm trying to is to popup tooltip above the "x Recipients" which contains their names (the recipients names by the bind prop "recipients.email".)

I already tried to pass the recipients array to the controller by -> #:item.recipents.email#, but it sent [Oblect, Object] .

I need the real object and not the string format.

Thanks,

Ran

 

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Topalov
Telerik team
answered on 06 Jul 2016, 02:16 PM
Hi Ran,

You can wrap the TreeView in a ToolTip, and then apply custom logic, involving the TreeView dataItem() method to configure the ToolTip content option. I have modified the provided dojo to illustrate the suggested approach:

http://dojo.telerik.com/OgAqI/2

You can find more information about the Kendo UI ToolTip in our documentation and demos:

http://docs.telerik.com/kendo-ui/controls/layout/tooltip/overview

http://docs.telerik.com/kendo-ui/api/javascript/ui/tooltip

http://demos.telerik.com/kendo-ui/tooltip/index

I hope this helps.

Regards,
Dimiter Topalov
Telerik by Progress
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
0
Ran
Top achievements
Rank 1
answered on 06 Jul 2016, 03:04 PM

Thanks that was very helpful!

One last thing, I want to display each recipient in separate line (new line)

How can i do something like that?

Ran

0
Dimiter Topalov
Telerik team
answered on 08 Jul 2016, 07:27 AM
Hi Ran,

You can apply custom logic to manipulate the tooltip content before returning the final result, e.g.:

content: function(e){
  // building result
...
return result.join('<br />');
}
...

http://dojo.telerik.com/OgAqI/3

Regards,
Dimiter Topalov
Telerik by Progress
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Tags
TreeView
Asked by
Ran
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Ran
Top achievements
Rank 1
Share this question
or