Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Nested gridview paging causes the div section to close

Posted on 2009-07-01
2
Medium Priority
?
765 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Assisted Solution

by:prashantagarw10
prashantagarw10 earned 80 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

688 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