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

4

1 回答 1

1

如果您按照此处http://scheduler-net.com/docs/lightbox.html#define_crud_logic的描述保存更改,

请注意,该方法使用SchedulerFormResponseScript类来呈现响应。构造函数将事件类的实例返回给客户端。该事件的值将应用于客户端的相关事件

 return (new SchedulerFormResponseScript(action, changedEvent));

确保您发送的对象 (changedEvent) 已初始化所有数据属性。基本上,事件应该具有与从数据操作加载时相同的数据。

另一种可能更直接的解决方案是在保存事件后使用客户端 api 重新加载日历数据:

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

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

于 2014-03-07T10:22:37.507 回答