Link to home
Start Free TrialLog in
Avatar of ddl_ex5
ddl_ex5

asked on

Nested gridview paging causes the div section to close

Dear All,

I have two gridviews one within each other.

I have applied paging to the outer and the inner gridview but am facing a little dilema.
When i page through the nested gridview the gidview collapses.

I have put the nested gridview within a div tag which through javascript opens and closes the div to hide / show the gridview when clicking over the outer gridview row.

I followed the following example to help me produce my page.
http://www.aspboy.com/Categories/GridArticles/Hierarchical_GridView_With_Clickable_Rows.aspx

I even thought of putting the entire body of the page within an update panel, but no joy.
the javascript is
 <script language="JavaScript" type="text/javascript">
 
var currentlyOpenedDiv="";
 
function CollapseExpand(object)
 
{
 
        var div=document.getElementById(object);
 
        if(currentlyOpenedDiv!="" && currentlyOpenedDiv!=div)
 
        {
 
                currentlyOpenedDiv.style.display="none";
 
        }
 
        if(div.style.display=="none")
 
        {
 
                div.style.display="inline";
 
                currentlyOpenedDiv=div;
 
        }
 
        else
 
        {
 
                div.style.display="none";
 
        }
 
}
 
</script>

Open in new window

SOLUTION
Avatar of prashantagarw10
prashantagarw10

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial