I used this article (http://www.codeproject.com/KB/webfor...dGridView.aspx) to accomplish expand/collaspe grid. I also added a search and it works. but i need to be now automatically expand the corresponded grid where search was found.
User has to click on all the parent grid to find out which child grid has records. How can I automatically expand the grid where there are results?
I probably need a function like below ExpandAll() which i can call right after I call this method fillsubgrid() upon clicking the search button. the following i m using for expand/collaspe.
User has to click on all the parent grid to find out which child grid has records. How can I automatically expand the grid where there are results?
I probably need a function like below ExpandAll() which i can call right after I call this method fillsubgrid() upon clicking the search button. the following i m using for expand/collaspe.
Code:
function expandcollapse(obj,row) { var div = document.getElementById(obj); var img = document.getElementById('img' + obj); if (div.style.display == "none") { div.style.display = "block"; if (row == 'alt') { img.src = "minus.gif"; } else { img.src = "minus.gif"; } img.alt = "Close to view other Records"; } else { div.style.display = "none"; if (row == 'alt') { img.src = "plus.gif"; } else { img.src = "plus.gif"; } img.alt = "Expand to show Records"; } }
Comment