reload only in edit event

Questionsreload only in edit event
aron asked 2 months ago

Hello, i have this:

$opt2[“onAfterSave”] = “function(){ var selr = jQuery(‘#list1’).jqGrid(‘getGridParam’,’selrow’); jQuery(‘#list1’).trigger(‘reloadGrid’,[{jqgrid_page:1}]); setTimeout( function(){jQuery(‘#list1’).setSelection(selr,true);},500 ); }”;

in the set  on a 2d grid (list2) for when i save, reload in first grid (list1), but the reloading just works with edit event, not  with add and delete event…. why????

this in the rest of code….

$e2[“on_after_insert”] = array(“fff”, null, true);
$e2[“on_after_update”] = array(“fff”, null, true);
$e2[“on_after_delete”] = array(“fff”, null, true);
$grid2-> set_events($e2);

function fff(&$data)
$id = intval($_GET[“rowid”]);
$sql = “select (GROUP_CONCAT(clientes.nombre ORDER BY clientes.nombre SEPARATOR ‘, ‘)) AS x FROM clientes,tarios WHERE AND tarios.tipo=’P’ AND tarios.client_id=”.$id;
global $grid2;
$result = $grid2->get_one($sql);
$x = $result[‘x’];
$grid2->execute_query(“UPDATE inm SET nombre = ‘$x’ WHERE id=”.$id);



Your Answer

2 + 5 =

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 / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!