CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

TIWCGJQNotificationNoty and Abort post

by zsleo » 02 Oct 2014 04:30

In a dataset on before post I do some final data validation and if data is invalid I then do the following:

iwcgjqntfctnNoty.JQNotificationNotyOptions.Text := 'Message....';
iwcgjqntfctnNoty.JQNotificationNotyOptions.Type_ := jqnntAlert;
iwcgjqntfctnNoty.JQNotificationNotyOptions.ShowNotification;
Abort;

The abort message pops up but the notify message never displays.

I don't care if the abort message does not pops up.

What should I be doing.

Regards

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

by Jorge Sousa » 02 Oct 2014 10:09

Hi zsleo

When you say

dataset on before post


When this particular data set and event is being triggered?

If this happens in a grid update operation, it's not an ajax event, the system is not prepared to execute any javascript when the event backs to browser, is a special data event where only data functions should be used.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Alexander Bulei » 02 Oct 2014 10:59

Hi zsleo,

I think, you need AjaxReRender:

delphi code
IWCGJQNotification1.JQNotificationNotyOptions.Text:= 'My message!';
IWCGJQNotification1.JQNotificationNotyOptions.Type_:= jqnntAlert;
IWCGJQNotification1.AjaxReRender; // <- this line


Because the default value of JQNotificationType is jqntFreeow, and when you change it to jqntNoty on some event (not OnCreate), the component need load additional javascript files.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by zsleo » 03 Oct 2014 00:36

Worked perfectly.

Thanks again...
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33


Return to JQNotification

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.