2

I have problems and questions about this scheduler. I already tried to build and almost finished it. Although, I receive some errors...

What I do?

  • I create custom lightbox
  • mapping all the data in to table dbo.bEvent
  • I used custom eventbox like this : Scheduler.Templates.event_text = "({position_desc})" + " " + "{newrate}"
  • position_desc is actually from other table 'dbo.zone'
  • I create Views in SQL Server to retrieve data from 'newrate'. 'newrate' actually is a new attribute after I do some query to change rate "1000 to 1k" which is new rate save '1k'. the views that I create by joining table "dbo.zone and dbo.bEvent"

Problem is?

  • when I save a new data or insert or update new data. my event box just give me '(Undefine)undefine'
  • all the data that i put in lightbox is save in dbo.bEvent
  • after I resfresh the page using f5 or navigate to next page or previous page then the data is updated.

Here i attach some screenshot. Thanks in advance

http://s1319.photobucket.com/user/matpyam/library/?sort=3&page=1

Alex
  • 4,821
  • 16
  • 65
  • 106

1 Answers1

1

If you save the changes as described here http://scheduler-net.com/docs/lightbox.html#define_crud_logic ,

note that the method uses SchedulerFormResponseScript class to render the response. Constructor takes instance of the event class to be returned to the client. Values of that event will be applied to the related event on the client-side

 return (new SchedulerFormResponseScript(action, changedEvent));

make sure object that you send (changedEvent) has all data properties initialized. Basically the event should have the same data as when it is loaded from the Data action.

Alternative solution, which may be more straightforward, would be reload calendar data with the client-side api after saving event:

scheduler.clearAll();
scheduler.load("dataUrl", "json");

http://docs.dhtmlx.com/scheduler/api__scheduler_clearall.html http://docs.dhtmlx.com/scheduler/api__scheduler_load.html

Paul
  • 1,656
  • 11
  • 16