Tooltip mvvm control inside grid column.headerTemplate is not working

2 posts, 1 answers
  1. Adam
    Adam avatar
    1 posts
    Member since:
    Dec 2014

    Posted 03 Jun 2015 Link to this post

    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.

     

  2. Answer
    Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 05 Jun 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
Back to Top