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

How to create editable template with the resource?

5 Answers 260 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Benjamin
Top achievements
Rank 1
Benjamin asked on 17 Jul 2013, 01:53 AM
Hi,

I like the new Scheduler,
I would like to change the date format in the pop up. so i try to create editable template ,
and my question how to add my recources input and All day event check box in that template ?  I only know how to add the start and end time from this example.

<script id="editor" type="text/x-kendo-template">
<h3>Edit meeting</h3>
<p><label>Title: <input name="title" /></label></p>
<p><label>Start: <input data-role="datetimepicker" name="start" /></label></p>
<p><label>Start: <input data-role="datetimepicker" name="end" /></label></p>
</script>

regards,
ben

5 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 18 Jul 2013, 01:23 PM
Hi Benjamin,

 
Basically there are several ways to create the resources editors and which one you would choose depends entirely on you and the exact setup that you have. For convenience I created small example of custom editor template which gets all available resources from the Scheduler and generate different editors based on if the current resource is multiple. You can use this example as a baseline to achieve the desired behavior:


Kind 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
CW
Top achievements
Rank 1
answered on 19 Aug 2013, 11:03 AM
can we load resource according to another resource.(eg :- when we change the first drop down second one populate with first one selected value.)
 
0
Vladimir Iliev
Telerik team
answered on 20 Aug 2013, 07:21 AM
Hi,

 
Basically you can modify the resources editor to create a cascading functionality or implement another custom solution.

Kind 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
Firas
Top achievements
Rank 1
answered on 21 May 2014, 10:31 AM
Hi Vladimir lliev,

Thanks for posting the sample. I have two questions about it:
1. Why the javascript script block the builds the template controls from resources is embedded inside the original editable script template itself; i.e. text/x-kendo-template?
2. Why that javascript block is closed with <\/script></script> and not </script> only?

Firas
0
Vladimir Iliev
Telerik team
answered on 23 May 2014, 07:53 AM
Hi Firas,

Please check the answers of your questions below:

1) The script block is nested inside the template in order to be executed just after the template is executed - this way no additional code is required (like custom "edit" event handler). 

2) The closing script blocks nested inside the template should be escaped as otherwise they will break the template.

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
Scheduler
Asked by
Benjamin
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
CW
Top achievements
Rank 1
Firas
Top achievements
Rank 1
Share this question
or