
Desired UI behavior would be to only allow authenticated users to create an event, to allow any user to view the complete detail of an event but readonly fields and remove the Save / Delete buttons if they are not the owner.
Any suggestions are appreciated.
8 Answers, 1 is accepted
There are several ways to accomplish your goal:
- Implement the Create/Update/Delete functionality manually. This will give you a full control over them and hence achieve your business requirements more easily. This approach is useful if the business logic is very complex and specialized
- Customize current widget behavior:
Regards,
Georgi Krustev
Telerik

Currently, there is no specific examples showing how to use some of the suggested approaches. I would suggest you choose one of them and give it a try using the mentioned steps and API documentation. If you encounter any difficulties, let us know. We gladly will assist you accomplish your goal.
Regards,
Georgi Krustev
Telerik

Something similar to...
​function scheduler_edit(e) {
var scheduler = $("#scheduler").data("kendoScheduler");
if (userIsEditor) {
scheduler.TemplateName = "EditEventTemplate";
}
else {
$(".k-scheduler-update").remove();
$(".k-scheduler-delete").remove();
scheduler.TemplateName = "ViewEventTemplate";
}
}
I look forward to your reply tomorrow...
The edit event is raised after the edit form creation. Hence you cannot change the edit template on the fly.
Probably the best way to handle your requirement is to use a custom editor template and control the state of each element part of the template based on the current credential information. In other words, define a custom editor template and allow or disable, hide or show some widgets based on the currently logged user. You can get the credential information on load and use it in directly in the editor template. Here is a demo, which shows the proposed approach in action.
Regards,
Georgi Krustev
Telerik

I stumbled on this post while looking for something else ...
I am able to swap out the custom editor by assigning a function to the editable.template property:
...
...
...
editable: {
//template: kendo.template($("#schedulerTemplate").html())
template: kendo.template(function (event) {
if (event.isAllDay) {
return $('#AllDayEditorTemplate').html();
}
return $('#schedulerTemplate').html();
})
},
...
...
...
Here is a demo based on Georgi's last demo: http://dojo.telerik.com/IFeNU.
(One caveat of this approach is that it doesn't handle escaped html in the template, as is present in the original demo.)
As I'm relying on this behavior for critical aspects of my application, I'm very eager to know if this is an acceptable approach or subject to breaking in the future.
Thanks.
Sam.
I believe that the used solution is acceptable and will work just fine.
Regards,
Georgi Krustev
Telerik
