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

Combobox MVVM headerTemplate

5 Answers 156 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Yotam
Top achievements
Rank 1
Yotam asked on 22 Nov 2013, 06:19 PM
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!

5 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 26 Nov 2013, 03:19 PM
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!
0
Accepted
Yotam
Top achievements
Rank 1
answered on 23 Dec 2013, 10:55 PM
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
0
Josh
Top achievements
Rank 1
answered on 26 Feb 2014, 06:52 PM
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.
0
Yotam
Top achievements
Rank 1
answered on 26 Feb 2014, 07:10 PM
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.
0
Vladimir Iliev
Telerik team
answered on 27 Feb 2014, 09:50 AM
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!
Tags
ComboBox
Asked by
Yotam
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Yotam
Top achievements
Rank 1
Josh
Top achievements
Rank 1
Share this question
or