Second Grid

QuestionsSecond Grid
Gustavo Lazaro asked 2 years ago

Hi. How could you make the second grid enabled or not depending on the value of a column of the first grid. Thank you

1 Answers
Abu Ghufran answered 2 years ago

You can put second grid inside a <div id="#second" style=>…</div>

And connect onSelectRow event on first grid.
$opt["onSelectRow"] = "function(ids) { do_onselect(ids); }";

function do_onselect(id)
var rd = jQuery('#list1').jqGrid('getCell', id, 'company'); // where invdate is column name
if (rd == "Google") jQuery("#second").show();
else jQuery("#second").hide();
where list1 is first grid id, and company is it's column to check value.

Your Answer

18 + 4 =

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!