Hi all, I am trying to insert or edit events from outside the calendar. I trigger the lightbox open using scheduler.showLightbox on editing and I use scheduler.addEvent(). Both open the lightbox and all seems right. But when i save the event, nothing happens. This is what is sending to server:
I’ve already tried with that, but I have no results, nothing is saved. When I try triggering lightbox from scheduler it works fine. But when I trigger the lightbox from outside the scheduler nothing happens. When I try to save, the info sent to server is
[object Object]
ids 1325685441279
Instead of all other params that the other way sends to server.
a) if you need to open lightbox just after new event creation - you still need to use addEventNow instead of addEvent
b) be sure that code in onLightbox doesn’t throw js errors
also, are you including separate dataprocessor.js ? In such case if it is one from dhtmlx 3.0, be sure that you are using latest scheduler ( 3.0 ) as well. If you are including old version of dataprocessor ( from 2.6 ) and using scheduler 3.0 - it also may be the reason of the problem.
Maybe thats the reason, I have an older version of dataprocessor. But why it works fine triggering lightbox directly from scheduler and not working when I try the lightbox from an anchor?
If it is caused by dataprocessor’s version, it must occur for all scenarios of new event creation
Try to exclude dataprocessor.js from the page ( the dhtmlxscheduler.js contains inside its own version of dataprocessor, so code must not broke ) and check will it improve situation or not.
When I use directly from scheduler it works fine. But when I do it from an anchor (onclicking) it does not work. I tried excluding dataprocessor and it does not work.
It worked but there is a problem. If i remove dataprocessor.js from page I cannot work with grids. There is some kind of collision that i have to get rid. Any idea?
Thanks for helping out with this issue. Reading through this i was able to figure out some of the things I am trying to achieve but I still have some issues. I am using ASP.NET MVC framework. So I want to place a button outside the scheduler for creating a new event. What I need is for the lightbox to popup without creating the event and once the information is filled and clicked on SAVE then I want the event to be created. What I use currently does the operations in opposite order. first it creates the event and then opens the lightbox. Therefore if I click on cancel on lightbox event will still be there. Here is the code I use.