Categories | Question details Back To List | ||||||||
dhtmlxscheduler refresh not working Hi, 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) scheduler.load("get_scheduler_xml.aspx", function(){ } 2) tried iterating through all the events & deleteEvent(event_id) before loading 3) tried avoiding using the cache/clearing it using the <meta http-equiv="CACHE-CONTROL" content="NO-CACHE" /> on the main aspx page that has this control None of the above work. Is there an alternative that works? Thanks, Radhika Answer posted by Alex (support) on Nov 04, 2009 03:51 Hello, 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: <data><action type='inserted' sid='125733529656' tid='new event id' ></action></data> 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. For update: <data><action type='inserted' sid='event id' tid=event id' ></action></data> For delete: data><action type='deleted' sid='event id' tid=event id' ></action></data> Answer posted by Radhika on Nov 04, 2009 07:50 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. Answer posted by Alex (support) on Nov 04, 2009 08:47 Probably I have misuderstood your question for the first time. You can try to use the following approach to reload scheduler: scheduler.clearAll(); scheduler.load("get_scheduler_xml.aspx?uid="+scheduler.uid()); Answer posted by Radhika on Nov 04, 2009 10:55 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.
Attachments (1)
Answer posted by Alex (support) on Nov 05, 2009 00:11 Hello, 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: http://www.dhtmlx.com/docs/products/dhtmlxConnector/index.shtml Answer posted by Radhika on Nov 12, 2009 11:45 Hi, 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. |