Custom button on subgrid toolbar.

QuestionsCustom button on subgrid toolbar.
Montemaggiore Sebastian asked 9 years ago

Hello Abu. I saw the example in ../demos/master-detail/subgrid.php and subgrid_detail.php and i coludn´t undestand why in subgrid_detail.php you use

jQuery('#<?php echo $g->id?>').jqGrid('navButtonAdd', '#<?php echo $g->id?>_pager',

instead of something like

jQuery('#aperturas').jqGrid('navButtonAdd', '#aperturas_pager',

The case is that i want to put a custom button in the toolbar of the subgrid and my code does not show the button.
I put my code in pastebin:
Master-Grid —> http://pastebin.com/gP97pvL8
Sub-Grid ——> http://pastebin.com/fQ8veiUq
Can you help me?.

2 Answers
Montemaggiore Sebastian answered 9 years ago

Hello Abu.
I forgot I had this question. Of course it's silly . There are many subgrillas and how to identify it is through his relation id
jQuery ('# < ? Php echo $ g- > id ? >' ) . JqGrid ( ' navButtonAdd ' '# < ? Php echo $ g – > id > _ pager ' ?
I worked late and sleep played a trick on me .

Abu Ghufran answered 9 years ago

Each subgrid has different id based on parent row that is expanded. You can get it $g->id.

Your Answer

7 + 17 =

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?