Page 1 of 1

TIWCGJQNotificationNoty and Abort post

PostPosted: 02 Oct 2014 04:30
by zsleo
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

Re: TIWCGJQNotificationNoty and Abort post

PostPosted: 02 Oct 2014 10:09
by Jorge Sousa
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.

Re: TIWCGJQNotificationNoty and Abort post

PostPosted: 02 Oct 2014 10:59
by Alexander Bulei
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.

Re: TIWCGJQNotificationNoty and Abort post

PostPosted: 03 Oct 2014 00:36
by zsleo
Worked perfectly.

Thanks again...