We are using the dtmlx suite of products in our ASP.NET (.NET framework 2.0) web apps and I’m currently experimenting with the dhtmlxscheduler.
I’m not using the dhtmlx Connector but using my own logic to persist the newly added, modified & deleted events to the database. However there’s a problem with the refresh as on postback or page reload, the newly added/updated events are not showing up (even when these changes are persisted back to the database by my XML HTTP logic). On page reload or upon clicking F5, I’d like to force the scheduler to init again (i.e. get all events from the db & not using caching).
I used a variety of techniques
1) tried the clearall() before loading (note - i’m using the load that uses an aspx page which generates the xml)
2) tried iterating through all the events & deleteEvent(event_id) before loading
3) tried avoiding using the cache/clearing it using the on the main aspx page that has this control
None of the above work. Is there an alternative that works?
you don’t need to reload the scheduler each time you make changes in it.
But the ./Contrat.do?reqCode=updateConsultant&xml script should return the correct xml to confirm changes:
For example in case of insert action the xml should be:
where sid is the id that is received in the request (the id of added event), tid is the id of the event in the database. When the response xml is got, sid will be change to tid in scheduler automatically.
<action type=‘inserted’ sid=‘event id’ tid=event id’ >
data><action type=‘deleted’ sid=‘event id’ tid=event id’ >
Sorry, but I dont understand why I need to recreate the xml with sids & tids.
I’m using an aspx page to generate xml on the fly (with event_id = 1 etc) and the xml needs to be regenereted each time & the scheduler reloaded (note - i’m not using the dhtmlconnector but using custom logic in ASP.NET). Currently the init is not working because its loading the data from the cache.
I have seen other users having this issue and I wanted to find out a solution that works for this case.
Please let me know.
Probably I have misuderstood your question for the first time.
You can try to use the following approach to reload scheduler:
Thanks for your reply. I tried that but it doent work.
The scenario is:
1) Update an event - the logic updates the event both on the screen & the backend
2) Now, reload the screen by pressing F5
3) the event now loses it data
I have attached my code. Please review & let me know what’s missing.
Default.aspx (14.6 KB)
It seems that you use some custom functionality to send changes to the server and save data in the database.
Please, check that data is correctly saved in the database and xml contains all events.
There are dataprocessor and connectors functionality. You can use them to saved changes:
dhtmlx.com/docs/products/dht … ndex.shtml
Wanted to let you know that I figured out a way to solve this.
Its a hack really… Add a random number generator as a query string to the URL of the aspx /php page and the scheduler will reload afresh each time.
For those who have the same problem, here is an answer : the server or the browser is caching the result of the “get_scheduler_xml.aspx” page. That’s why adding a random number on the URL correct the problem : it prevents caching the file because the URL changed between page reload.
The correct solution is the following :
In “get_scheduler_xml.aspx”, you probably do some kind of code :
myHttpContext.Response.Write("... some XML here...");
To avoid the caching problem, you should add this line before the “response.Write” :