Combobox MVVM headerTemplate

6 posts, 1 answers
  1. Yotam
    Yotam avatar
    2 posts
    Member since:
    Jul 2013

    Posted 22 Nov 2013 Link to this post

    Hi,

    I'd like to specify a header template (http://demos.kendoui.com/web/combobox/template.html) for my MVVM Combobox. I've tried data-header-template and data-headertemplate. Neither works. Please advise.

    data-template works fine, btw.

    EDIT - added jsfiddle link: http://jsfiddle.net/6mHKF/20/

    As you can see, the headerTemplate is ignored in the non-MVVM widget initialization method as well.

    Thanks!
  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 26 Nov 2013 Link to this post

    Hi Yotam,

    Please note that when initializing the comboBox without MVVM the header template is working as expected (after updating the jsFiddle to use the latest KendoUI official release -v2013.3.1119). When initializing it using MVVM however a JavaScript exception is thrown - we will investigate further current behavior and follow you up in current thread when we have more information about current behavior. 

    As a small sign of our appreciation I have updated your Telerik points.

    Regards,
    Vladimir Iliev
    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
  4. Answer
    Yotam
    Yotam avatar
    2 posts
    Member since:
    Jul 2013

    Posted 23 Dec 2013 Link to this post

    Hi Vladimir,

    Thanks for the answer.

    If anyone's curios, I've gotten around this issue by prepending the desired element to "e.sender.list" on the dataBound event.

    Best,
    Yotam
  5. Josh
    Josh avatar
    4 posts
    Member since:
    Feb 2014

    Posted 26 Feb 2014 in reply to Yotam Link to this post

    Yotam,

    Could you potentially post a code example of how you did this? I am using HTML only (no javascript) because I am rendering a combobox within a popup editor template. Simply declaring data-template-header does not work for me either.
  6. Yotam
    Yotam avatar
    2 posts
    Member since:
    Jul 2013

    Posted 26 Feb 2014 in reply to Josh Link to this post

    Hi Josh,

    The workaround I found requires javascript as you need to supply your own callback to an event (I used dataBound, but you can potentially use others).

    I'm pretty sure you can do it with a combobox within a popup editor. If you'll post a fiddle or codepen I'll try to help you out.
  7. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 27 Feb 2014 Link to this post

    Hi,

    Please note that the fix is already included in latest official release of KendoUI - 2013 Q3 SP2 which is available for download from your accounts (at telerik.com). Please check the updated demo below:

    Regards,
    Vladimir Iliev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready