CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

OnGetData from database not triggering

by zsleo » 16 Mar 2015 00:26

I have a carousel with a scheduler on every carousel panel.

The schedulers are all database bound.

All schedulers are set to the same scheduler view.

The number of carousel panels visible depends upon the number of schedulers with data for the selected scheduler view.

The problem is when I perform a next / previous on schedulers, if a scheduler is not being displayed (but is visible is set to true but not yet rendered) the scheduler's OnGetData event is not triggered. This results in the scheduler being displayed but with no data.

The data is displayed after my Reload button is pressed - sometime I have to press it up to 3 times.

This is too complex to provide a simple demo so, if CGD cannot repeat it then may I suggest a remote log in.

I can, if you want, publish the app for you to play with / look at the user interface.

I have been trying for most if the past week to resolve this issue but without success.

TIA and regards
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by zsleo » 17 Mar 2015 01:46

Attached is a sample application (extract from a MUCH larger code base) that demonstrates the issues I am experiencing.

This is the smallest I can get the code and still demonstrate the issues.

MS SQL 2008 file: PlayDB.7z
XE Source: ApptTest.7z

Just click the "Login" button - tNo UID/PWD required

1. Using different browsers and task manager you will see the CPU issues.

2. WRT "OnGetData from database not triggering"
I have implemented a solution in the attached code but if you run the app with code as is it works as I want.

If in unit frAppointmentbook comment lines 172 & 190 and uncomment lines 173 & 191, recompile and run you will see the following:
- keep clicking "Previous" button until you get to "Sat 14/03";
- there are no appointments for this day;
- click "Previous" button again and you will see that the scheduler remains at "Sat 14/03" but it should be "Fri 1303";
- click "Reload" and the correct scheduler data presents;
- click next a few times and you will see that the schedulers display data for the incorrect dates;
- click reload at any time to re-align the schedulers to the selected date


The difference between the two versions is using GotoDate -vs- PreviousRange/NextRange

Regards
You do not have the required permissions to view the files attached to this post.
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by zsleo » 19 Mar 2015 19:49

... bump
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Jorge Sousa » 20 Mar 2015 15:36

Hello

Well, first of all, your demo is not a simple demo, we take a lot of time to adapt it.

For instance, what is TADOConnectionEx?

After all adpatations, we can see that the OnGetData event handler IS in fact get called.

Maybe because all of queries in frAppointmentbook don't have Connection assigned? Did you debug it?
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by zsleo » 20 Mar 2015 19:23

Sorry about TADOConnectionEx in an extension to TADOConnection that at runtime forces a db disconnection to the db if compiled withTADOConnectionEx connected.

If you changed this component to TADOConnection you will need to reassign the db connection of all TADOQuery components.

Do you want me to post the TADOConnectionEx source?

... and yes, the code is debugged. That is how I repeated the problem issues.

The code is the simplest I can get it to demonstrate my findings.

Regatds
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Jorge Sousa » 23 Mar 2015 10:52

Hi Leo

We did replace the TADOConnectionEx comp with TADOConnection

We ran the project and

we could
see that the OnGetData event handler IS in fact get called.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to JQScheduler

Who is online

Users browsing this forum: No registered users and 3 guests

Contact Us.