Disable cache of lightbox

I read somewhere that the scheduler only creates the lightbox once. Now in our custom lightbox form we need to reload the data everytime it is opened but the same ligthbox form is opened without reload. Can we force a refresh of the lightbox in scheduler .NET or in javascript somehow?

Hi,
by default scheduler uses loaded event data for the ligthbox (i.e. there is no built-in option for reloading events)

What you can do is to capture client-side api event that happen before opening the lightbox. From the handler you can prevent initial showing of the lightbox. Instead of this, you send an ajax for reloading data of particular event. When it’s done - you manually open the lightbox

[code]scheduler.attachEvent(“onDblClick”, function (id, e){
//reload event from the server, and open lightbox when it’s done.
//Use id parameter to filter data on the server side and return only needed event
scheduler.load(“data-url?id=”+id, function(){
scheduler.showLightbox(id);
});

//cancel opening lightbox with an old data
return false;

})[/code]

docs.dhtmlx.com/scheduler/api__s … event.html
docs.dhtmlx.com/scheduler/api__s … _load.html
docs.dhtmlx.com/scheduler/api__s … htbox.html

Note that onBeforeLightbox event , which you also can use for this scenario, is always triggered from showLightbox method. If you’ll use this event have to set some flag to determine whether lightbox has been invoked by user actions (double click) or by your code.

Alternatively, you can define a server-side form for the lightbox. It will always call the server before showing. However, if you use recurring events, you’ll have to manually implement a control for them, since the built-in control for the recurring events won’t be available
scheduler-net.com/docs/lightbox. … a_lightbox