iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi Team -
We just encountered a problem which might be just a setting issue in scheduler and it would be great if you guys can provide us some insight over the same.
So whats happening is , when we re-select a already picked date from our calender it do re-render all the events in the control board but not the latest records which are updated after that date was first picked from the calender. To be brief here is an example :
Suppose user1 picked todays date and he can see the latest bookings in the scheduler and after that other users made some new bookings or updates for that particular day and to see those user1 re-selects that date again and he won't see all those updates. User1 needs to refresh the whole page with a f5 to see those changes.
We tried to do some trouble shooting from our end and this is what we found. In the browser developer tool we looked at the calls being made in the Network console when we pick a date from calender. So when we pick up a date which is not picked up before in calender we can see a server side call is made to get the data but when we re-select that date there is no server side request. So we believe that somehow the control is caching the data once it is bind to a particular date at the first time and when we select that date second time it just renders the same data in the control.We actually able to make it work by using client side event "OnCalenderCellClicked" in which we are forcing page to do a complete post back every time a date is picked and which actually looks very ugly and not the best method to resolve it (code snippet for the same is attached below)
function WebSchedulerSummary_OnCalenderCellClicked() {
try { setTimeout(function () { __doPostBack('', ''); }, 500); } catch (exception) { } return false; }
A quick response will be appreciated which we know that you guys always do.
Thanks - Frank
Hi Frank,
Have you tried this code in OnCalendarCellClicked client side event?
function OnCalendarCellClicked(controlId, cellElement, selectedDate) { var scheduler = ISGetObject(controlId); scheduler.Refresh(); }
With this function WebScheduler will be forced to refresh all data in their cache. Please let me know if this function solved your problem. Hope this helps.
Regards,Bernard
Hi Bernard -
Thanks for the prompt reply. We tried your mentioned code but some thing strange happen, When the scheduler firstly load it was on today's date (05-16-2014) and load the data which is fine . We picked some other date and then repick todays date (05-16-2014) and control worked ,it did made a server side call and updated the data but when being on today's date we repick today's (05-16-2014) date again it came up with blank screen (no data was loaded) and also we verified that it did made a server side call also. So now the propblem is that if we repick a date which we are currently on it loads a blank screen.
So we slightly modify your code from our end and then it worked for us.Below is the code snippet for the same:
function OnCalenderCellClicked(controlId, cellElement, selectedDate) { var scheduler = ISGetObject(controlId); setTimeout(function() { scheduler.Refresh(); }, 500); };
As you can see, what we did is that we delayed the scheduler refresh request because it appears to us that whatever default function is binded to the calender cell click event that might be clashing with the new client function introduced (OnCalenderCellClicked).Let us know if this implementation looks ok or if there is a method by which we can prevent the default event attached to the calender cell (some thing like event.preventDefault) which we can use above scheduler.Refresh().
Like i mention it do work for us but looking forward for hopefully the last fix to this problem.
I think this problem happen because the function that bound in Calendar cell click event clash with scheduler.Refresh function that you called in client side. This might be happen because WebScheduler do FlyPostback request that shouldn't be interrupted with the other FlyPostBack request. Perhaps, you can use your method to delay Refresh function in WebScheduler. By doing this, WebScheduler's bound method won't be interrupted by our client side event. I will try to inform our developer team regarding this problematic behavior. Hope this helps.
Thanks for the reply , so your explanation basically justifies what we doubt is happening and like you said that the way we have right now implemented it is the best way to do it so probably we will rest our case here then :-)
Finally I would like to appreciate your support and would like to mention that it is one of the best support system I have came across. Looking forward for the same assistance in the near future also.
Thank you for your compliment. Please let me know if you have any question regarding for our control. I will gladly help you to resolve it.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname