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

Show Create Event Programmatically

5 Answers 213 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
jwize
Top achievements
Rank 1
jwize asked on 19 Jul 2014, 08:38 AM
I am creating tasks from the calender but I would also like to popup the create event dialog from a grid in another view. Is there a way to do this. So, far I have only hypothesized a hack where I hide an instance of scheduler and find a calendar cell and execute a dblclick event on it. This will popup the create event dialog. There should be a better way to accomplish this task.

Please let me know, thanks!

5 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 21 Jul 2014, 12:24 PM
Hello Jaime,

Did you try the addEvent method? It will open the create/update edit form (check this demo for more information). If you would like to achieve the look and feel of the scheduler edit form without actually creating scheduler then you will need to implement the whole functionality manually.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
jwize
Top achievements
Rank 1
answered on 21 Jul 2014, 10:21 PM
Yes thanks!  I figured out that addEvent pops up the new event editor. How do I get the uid(the lone parameter for editEvent)  for the edit event from the server so I can add it to a grid and then show the editEvent dialog from a custom button? 
0
Georgi Krustev
Telerik team
answered on 23 Jul 2014, 09:48 AM
Hello Jaime,

In general, the uid value is generated on the client-side and it is irrelevant to the server. Every time view renders its events it generate new uid value. Could you please elaborate why would you need to get the uid and how you are going to use it together with grid widget? addEvent method does not require any "uid" value. It accepts any of the SchedulerEvent fields, as they will be used to populate the edit form.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
jwize
Top achievements
Rank 1
answered on 23 Jul 2014, 11:28 PM
The direction I was given is to not use the agenda view since the look across our application has grids with some custom filtering that we have implemented. The new event is fine with the addEvent. The problem was that I had to also implement the edit event from within the grid view. I was able to accomplish this by loading a hidden scheduler and using the data from that as the datasource for my grid.  I can now get the event id from within the grid and then find the same id and get the event from in scheduler datasource followed by using the event uid to show the editEvent dialog. Everything works now but there are some real slow performance issues that I can not figure out. It seems that all events are sent to the server everytime something is saved. I set batch to false on the scheduler but that seems to have no effect.   
0
Georgi Krustev
Telerik team
answered on 24 Jul 2014, 12:33 PM
Hello Jaime,

I am afraid that the given information does not  reveal what could cause the performance hit. In general, I would suggest you build a custom editor form, which does not depend on Scheduler itself. This definitely will increase the performance.

Regards,
Georgi Krustev
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
jwize
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
jwize
Top achievements
Rank 1
Share this question
or