Refer my previous solution
fire client side event for gridview on selection of row in asp.net[
^].
Instead of doing
visible="false"
, do
style="display: none;"
. Because when you set Visible false, it don't render that on browser, so you won't be able to do anything to that in client side.
Now in that
JavaScript
function, try to remove the
display: none
.
function gridRowOnclick(element)
{
alert("GridView clicked");
var yourTable = document.getElementById("tbljobAction");
yourTable.style.display = yourTable.style.display === 'none' ? '' : 'none';
}