CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Ajax events control

General discussion

by assapan » 16 Jun 2014 15:36

Hi,
I have several controls ( mainly edit ) which are fires Ajax onchange events to detect modifications and enable a "Save" button.
My problem is when i want to fill the edit with data in a procedure called by an ajax event , the event onchange are fired after the procedure ends so i have my button save enabled :?
How can i overcome this ?


sorry if my question seems to be stupid for Ajax familiar people :mrgreen:
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Jorge Sousa » 16 Jun 2014 16:04

Hi

What event are you using?

Because with JQEvents.OnChange we cannot reproduce this. The OnChange should only be triggered when user changes the edit value, not programatically.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by assapan » 16 Jun 2014 16:18

I tried both JQevents.OnChange and OnAsyncChange , both are fired when i fill the value !? :roll:
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Jorge Sousa » 16 Jun 2014 16:26

Hi

I'm sorry but we cannot reproduce such behaviour, can you please submit a test case.

Of course that we're only setting IWCGJQEdit1.Text
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by assapan » 16 Jun 2014 16:59

i will do so
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by assapan » 17 Jun 2014 09:48

Hi,
please find attached the demo of my problem
if you click on a panel item , it fills the edit with panel item tag , my problem is that it fires the onchange event after that so how can i void this problem ?

secondly i have a problem with IWCGJQTDateTimePicker if i set the date format to be "mmm dd/mm/yyyy" it displays correctly the date like "mardi 17/06/2014 15:00" but when the date or time is changed the datetime property returns only 17/06/2014.
You do not have the required permissions to view the files attached to this post.
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Jorge Sousa » 17 Jun 2014 11:22

Hi

I've to apologise about the Edit OnChange, there was an error in our test, (we had .Ajax=False in the button that changed the edit).

We're going to fix this for next version.

About the date picker, we will back to you asap.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by assapan » 17 Jun 2014 11:50

Thank you very much
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Jorge Sousa » 17 Jun 2014 11:54

About the datepicker,

well, you follow your own rules, but we've to accept the consequences.

As it is in all of our demos, when you create a frame to perform .AjaxReRender / RenderRegionAsync, you must use CGCallbackDisableAjaxResponse and CGCallbackEnableAjaxResponse

like this:

procedure TIWForm4.ButtonClick(Sender: TObject; AParams: TStringList);
begin
CGCallBackDisableAjaxResponse;
with CreeFrame(TFrame_Edit, WebApplication, 'FrameEdit') as TFrame_Edit do begin
CGCallBackEnableAjaxResponse;
IWFrameRegion.AjaxReRender(True,False);
end;
end;
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by assapan » 17 Jun 2014 17:31

hi,
i have done it but it doesn't solve the problem , is it suppose to ?
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

Next

Return to General - Archive

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.