Solved

Nested gridview paging causes the div section to close

Posted on 2009-07-01
2
722 Views
Last Modified: 2012-05-07
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

0
Comment
Question by:ddl_ex5
2 Comments
 
LVL 5

Assisted Solution

by:prashantagarw10
prashantagarw10 earned 20 total points
ID: 24756239
put a javascript alert whenver you are collapsing or expanding the inner grid's div thru javascript.
This will give you an idea of what is happening in the page load after the paging link is clicked by user.
Let me know the observation so that i can assist you further on this!

Cheers!
Prashant
0
 

Accepted Solution

by:
ddl_ex5 earned 0 total points
ID: 24803349
i decided that i would just bring back all the records and put the inner gridview into a panel with scrolling bars. it is not ideal but a quick fix.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question