Solved

Nested gridview paging causes the div section to close

Posted on 2009-07-01
2
742 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 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

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Graph API & MS Apps 1 82
Problem to Office 1 67
orderby list (from Json) 1 43
Data Analysis 7 59
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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