Hello Abu,
I am trying to export in PDF with master-detail, however is not filtering the master grid.
Code: https://gist.github.com/mediac3/72547f8cb14ded9db52edc3b5471e8de
You can get WHERE clause currently used by this code:
$searchstr = $_SESSION[“jqgrid_list25_searchstr”];
$wh = $this->construct_where($searchstr);
And use $wh in your export sql query.
On line 277, where you are loading $data, you will need to comment that and run sql query and get results in $data from that.
$searchstr = $_SESSION[“jqgrid_list25_searchstr”];
$wh = $this->construct_where($searchstr);
$data = $grid->get_all(“SELECT * FROM col_enrollment_book $wh”);
I’ve not tested this code so you need to debug using print_r, die.
Hello sir,
I did it, however show CMS issue as critical and it’s not possible to debug.
Regards!
After some research, it was found that wordpress deletes PHP’s native $_SESSION array which was used by datagrid library.
As a way around, it is suggested to install WordPress Native PHP Sessions – WordPress plugin | WordPress.org to make it work as expected. After that $_SESSION can be used inside wordpress callback functions.