Main Grid to subGrid and use js_on_select_row

QuestionsMain Grid to subGrid and use js_on_select_row
Cristian Engelmann asked 1 year ago

Hi Abu,

The old version when I clicked on the left column “+”, the new version is “>”, it showed me the sub grid. But my problem now is that when I click on the “>” column it executes two actions. There is no difference between the left column and the other columns. I need to separate the left column click actions from the others. because they are two different actions.

My code

“$opt[“subGrid”] = true;
$opt[“subgridurl”] = “subdetalle_centrocompras.php?id=”.$idco;
$opt[“subgridparams”] = “rproveedor,rut_proveedores,sucursal”;

$g = array();
$g[“js_on_select_row”] = “do_onselect”;
$grid->set_events($g);”

and javascript

“function do_onselect(id)
{
var rutproveedores = jQuery(‘#list1’).jqGrid(‘getCell’, id,’rut_proveedores’);
jQuery(“#span_extra”).html(rutproveedores);
var proveedorr = jQuery(‘#list1’).jqGrid(‘getCell’, id,’proveedor’);
jQuery(“#span_extra”).html(proveedorr);

parent.creaoc(rutproveedores,proveedorr);
}”

Thank you

1 Answers
Cristian Engelmann answered 1 year ago

Hi Abu,

It’s working.
Thank you a lot of

Your Answer

16 + 11 =

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?