| Support Center

(Back to Website)

Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Can I use Events on Laravel5.5?

hirohito wada Jan 13, 2018 04:35AM PKT

I can't use Events on Laravel5.5.

source
$e["on_insert"] = array("add_kamoku", null, FALSE);
$g->set_events($e);

error messeage.

call_user_func() expects parameter 1 to be a valid callback, function 'add_kamoku' not found or invalid function name
/Users/hirohito/Laravel5/ringi/app/Classes/phpgrid/jqgrid_dist.php#2167

Up 0 rated Down
Abu Ghufran Jan 13, 2018 09:24AM PKT PHP Grid - Support Center Engineer
It appears that your function add_kamoku is some class method and not global function.
In that case, you need to pass class name as second param. e.g. if your class name is 'Foo' you need to set:

$e["on_insert"] = array("add_kamoku", "Foo", FALSE);
Up 0 rated Down
hirohito wada Jan 13, 2018 10:59AM PKT
Thank you.

It solved. A little problem remains.

'jqg'+xx(xx is integer) show in Id column(Primary/autoincrement).
When reloading, It change integer.
Up 0 rated Down
Abu Ghufran Jan 13, 2018 11:49AM PKT PHP Grid - Support Center Engineer
You can set:

$opt["reloadedit"] = true;
...
$g->set_options($opt);

It will force reloading after add/edit.
Up 0 rated Down
hirohito wada Jan 13, 2018 05:19PM PKT
Unfortunately it doesn't work.
My options is follow


$opt=$this->opt_edit('科目一覧');
$g->set_options($opt);

-------------------------------------------

protected function opt_edit($param) {

$opt=array();
$opt["cellEdit"] = true;
$opt["scroll"] = true;
$opt["autowidth"] = true;
$opt["resizable"] = true;
$opt["viewrecords"] = true;
$opt["caption"] = $param;
$opt["actionicon"] = TRUE;
$opt["reloadedit"] = true;
// $opt["toolbar"] = TRUE;
// $opt["toppager"] = TRUE;
return $opt;
}
Up 0 rated Down
Abu Ghufran Jan 14, 2018 09:04AM PKT PHP Grid - Support Center Engineer
Can you check if this issue exist on demo: http://phpgrid.org/demo/demos/editing/inline-add.php
If it's working in demo, please compare you code with it.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Contact Us

  • Post a Public Question
  • Email Us
  • Live Chat!
  • Ask the Community

    Instructions

    • Paste complete code that is involved in your question. You can use pastebin.com to share code link.

    Screenshots or Online link of webpage is helpful in resolution. You can also send email at address mentioned below.

    • To report an issue, Write steps to regenerate the case.

    • For email support or live chat, Use gridphp@gmail.com and add it in Google Chat.
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete