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

Read Only view of an event

1 Answer 68 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Cheryl
Top achievements
Rank 1
Veteran
Cheryl asked on 29 May 2020, 02:23 PM

Hello,

 

In certain circumstances (for example the event is in the past or the user doesn't have write permission), I would like to able to double click on an event and display a read only version of that event in a popup. 

 

Much like how the edit works but with the items displayed and without inputs.  Ideally I would also like to be able to do this using some kind of display template.

 

I can't see anything in the samples or documentation on how to do this - if it is there , apologies, I missed it.

 

Thanks 

Cheryl 

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 03 Jun 2020, 12:31 PM

Hello Cheryl,

To implement the targeted functionality, you can use the edit event of the component. Inside the function which is executed when the event is triggered, you can use logic similar to the one discussed in this Kendo Scheduler: Prevent editing for completed event StackOverflow article.

Based on the current date, the JavaScript code from the linked thread will check if a given event has already happened or not. If we try to edit a past event, the edit will be prevented and the popup window will not appear.

Then in the same "edit" event function, you can initialize a Window component and display the event data inside it. The event data is available in the event handler as demonstrated in this Dojo example

I hope the above will help you implement the targeted functionality.

Regards,
Petar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Scheduler
Asked by
Cheryl
Top achievements
Rank 1
Veteran
Answers by
Petar
Telerik team
Share this question
or