Set event error

QuestionsSet event error
Sunil asked 6 years ago

When I call set update for bulk edit as below

$e["on_update"] = array("update_data","",true);
$g->set_events($e); I get the following error

call_user_func() expects parameter 1 to be a valid callback, class 'null' not found in C:wampwww….phpgridlibincjqgrid_dist.php on line 1946

I have a conflict with my jquery and the jquery used by the grid.
When i comment the grid's jquery my datetime picker will become date picker.
So I cannot remove ether one of the jquery please help.

3 Answers
Abu Ghufran answered 6 years ago

Please check if you are getting same call_user_func() error in demos. If yes, let me know your php version. If not, you can verify your code by comparing with demo.

For jquery conflict, i would recommend to include jquery migrate plugin. It make jquery versions compatible.
http://blog.jquery.com/2013/05/08/jquery-migrate-1-2-1-released/

Sunil answered 6 years ago

Hi,
The jquery I am using is 1.8.3 the same one as grid's jquery, can I use my jquery instead of grid's?
If I remove it will it affect the grid's working?
As per my observation the date picker is the only thing that has the issue.

As per the set_event() the error is not there in demo, only when I call it in the code it gives me the following error,

$e["on_update"] = array("update_data","",true);
$e["on_clone"] = array("custom_clone1", "null", false);
$e["on_data_display"] = array("filter_display1", "null");

$g->set_events($e);
when I uncomment the above line.

Warning: call_user_func() expects parameter 1 to be a valid callback, class 'null' not found in C:wampwww..phpgridlibincjqgrid_dist.php on line 1946

Fatal error: Cannot break/continue 1 level in C:wampwww..phpgridlibincjqgrid_dist.php on line 1951

Abu Ghufran answered 6 years ago

The datepicker js code is in jqurey-ui.custom.min.js. It should not conflict with jquery core if you have same versions.
You can also compare the jquery core js files.

For set_events() error, the issue is perhaps, "null" null with string.

In php, null is used without string.

Either remove " " from null, or make it empty string "". It should work after that.

$e["on_clone"] = array("custom_clone1", "", false);
$e["on_data_display"] = array("filter_display1", "");

Your Answer

0 + 9 =

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?