$grid[“multiselect”] = true;
$grid[“bulkedit_options”][“afterShowForm”] = “function(){ }”;
$e[“on_update”] = array(“update_data”,””,true);
$g->set_events($e);
**************
function update_data($data)
{
$g = new jqgrid(); // temp grid object to execute sql
if ($data[“params”][“bulk”] == “change-pr-pc”)
{
$selected_ids = $data[“IdEncuentro”];
$str = $data[“params”][“data”];
phpgrid_error($data);
\\ result with some rows selected, only one IdEncuentro —- Array ( [IdEncuentro] => 17962 [params] => Array ( [bulk] => cambiar-pr-pc ) )
$g->execute_query(“UPDATE CompeticionesEncuentros SET PA_ENom = ‘PC’ WHERE IdEncuentro IN ($selected_ids) AND PA_ENom=’PR'”);
Your Answer