Show Create Event Programmatically

6 posts, 0 answers
  1. Jaime
    Jaime avatar
    61 posts
    Member since:
    Mar 2013

    Posted 19 Jul 2014 Link to this post

    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!
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3748 posts

    Posted 21 Jul 2014 Link to this post

    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!
     
  3. Jaime
    Jaime avatar
    61 posts
    Member since:
    Mar 2013

    Posted 21 Jul 2014 in reply to Georgi Krustev Link to this post

    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? 
  4. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3748 posts

    Posted 23 Jul 2014 Link to this post

    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!
     
  5. Jaime
    Jaime avatar
    61 posts
    Member since:
    Mar 2013

    Posted 23 Jul 2014 in reply to Georgi Krustev Link to this post

    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.   
  6. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3748 posts

    Posted 24 Jul 2014 Link to this post

    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!
     
Back to Top