Hi Jorge
Just today i had enough time to test the Schedular again and found the following:
- Set ShowEditBynOnNewEvent to Trie
Add your sample code to the Close event of the IWFrameRegion:
- Code: Select all
procedure TJQCustomEventFrame.IWFrameRegionJQDialogOptionsClose(Sender: TObject;
AParams: TStringList);
var
Event: TIWCGJQSchedulerEvent;
JS: string;
begin
if Assigned(CurrentEvent) and (CurrentOperation = soNew) then
begin
Event:= CurrentEvent as TIWCGJQSchedulerEvent;
if Event.List.Options.Scheduler.EventSaved then
begin
JS:= Format('var ui=%s;',[Event.CGJSContainer.IDJQuery]);
JS:= JS + 'ui[0].bcal.releaseDragEvent();';
Event.CGJSContainer.AddJavaScriptToAjaxResponse(JS);
Event.Free;
end;
end;
end;
Start testing:
1 Browse to a week without events
2 Create an event, no text added but directly go to "Details" and directly choose "Close"
3 The code hits the Close event but the row:
if Event.List.Options.Scheduler.EventSaved then
result to true so event stays drawn where it should be deleted
As soon as i create another event its gone!
The strange thing is that this is not always the fact in my code, sometimes it will be deleted also. But as of the moment one is not deleted, no new events will be deleted anymore when needed.
Eric