Not working Custom Events

QuestionsNot working Custom Events
Oleg asked 11 years ago

Hello. I use the Custom Events in the Full (Premium) Version of the PHPGrid.

If I define сustom-event-handler (e.g. on_data_display) in case of $col["on_data_display"] = array(…) and the second argument – the name of the class = all works !

If I define сustom-event-handler (e.g. on_data_display) in case of grid-set_events… and the second argument – null (I use a global function) = all works !

BUT! If I define сustom-event-handler (e.g. on_data_display) in case of $grid-set_events… and the second argument – the name of the class = custom event ignore !
Help please, thank you.
.

3 Answers
Abu Ghufran answered 11 years ago

The second argument is class-object. Class name wont work.
You can pass in this way.

$e["on_update"] = array("update_client", new myclass(), false);

Oleg answered 11 years ago

Yes, it works! Thank you!

NOTE: but the same solution for the handler in the parameters of the column ($ col ["on_data_display"] = array ("filter_display", сlass-as-object); does not work – in this case, you must use the $ col ["on_data_display"] = array ("filter_display", "сlassname-as-string") – I checked)

Abu Ghufran answered 11 years ago

Noted, will sync all conventions.
Thanks

Your Answer

19 + 8 =

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?