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
Step1:
You can put second grid inside a <div id="#second" style=>…</div>
Step2:
And connect onSelectRow event on first grid.
$opt["onSelectRow"] = "function(ids) { do_onselect(ids); }";
$grid->set_options($opt);
Step3:
<script>
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