I have 7 mastergrids, each with a unique names. The problem I have is that the doc_id could appear in any number of mastergrids. When clicking on the link to show the div it makes visible the first on it finds, even if it is not in the mastergrid you are currently viewing. I need it to open the div in the mastergrid/nested gridview that I m clicking.
Hope someone can point me in the right direction. I'm too tired now for looking ;-)
var div = document.getElementById(obj);
var img = document.getElementById('img' + obj);
var theFlag = div.style.display == "none";
div.style.display = (theFlag) ? "inline" : "none";
img.src = (theFlag) ? "images/buttons/tl_arrow_down.gif" : "images/buttons/tl_arrow_straight.gif";
The button call
<img id="imgdiv<%# Eval("doc_id") %>"
alt="Click to show/hide documents"
border="0" src="images/buttons/tl_arrow_straight.gif" />
<div id="div<%# Eval("doc_id") %>" style="display:none;position:relative;" >