on_insert and on_after_insert

Questionson_insert and on_after_insert
lau asked 7 years ago

Can I have on_insert and on_after_insert on the same grid? 

1 Answers
Abu Ghufran Staff answered 7 years ago

Yes, this is possible.
The requirement is the on_insert should all continue execution and must not die/exit inside callback. Also the third param of on_insert setting must be true. e.g.

// if you pass last argument as true, functions will act as a data filter, and insert/update will be performed by grid
$e["on_insert"] = array("add_client", null, true);
_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

20 + 7 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?