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

Tooltip mvvm control inside grid column.headerTemplate is not working

1 Answer 337 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 03 Jun 2015, 01:20 PM

Hi,
I created grid definition using kendo mvvm framework and I'm trying to add tooltip for text inside column header. I thought I can use headerTemplate so I defined tooltip mvvm control inside header template but tooltip is not appearing. It looks that it’s imposible to define any mvvm control inside headerTemplate property? Is my assumption correct?

{ "field": "UnitPrice""headerTemplate" : "<span data-role=\"tooltip\" title=\"tooltip message\"> Header should have tooltip</span>" }

Full example is available here: http://jsbin.com/zizawey/1/

Thanks in advance.

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 05 Jun 2015, 11:55 AM
Hello Adam,

The described approach assumes that Kendo UI initializes widgets based on the kendo.bind() method and then inspects the generated HTML output in the Grid header cells for other new widgets that may need to be initialized on a "second pass". This is not supported.

You need to execute kendo.bind() again for the Grid's header area.

kendo.bind($(".k-grid thead"), viewModel);


Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
MVVM
Asked by
Adam
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or