it is showing white space when the gridview is hide from javascriptin asp.net 2.0

S

santosh

Dear all i want to make grid visible true and false in client side so
i am writting following code for it.

<script language="javascript" type="text/javascript">

PageLoad();

function PageLoad()
{
//
document.getElementById("grdOpenProj").style.visibility="hidden";

document.getElementById("grdClosedProj").style.visibility="hidden";

document.getElementById("grdBidding").style.visibility="hidden";

document.getElementById("grdDeclined").style.visibility="hidden";

document.getElementById("grdNotAwarded").style.visibility="hidden";

document.getElementById("grdPending").style.visibility="hidden";

}

</script>


It is hiding the grid the but showing the white space when grid is
hide. but when i make it visible true then and visible false the white
space is get removed.

following is the code for showing hided grid


function Hide(btnConrtol, divControl)
{

var vImgsrc = document.getElementById(btnConrtol).src;
var vSplitVal = vImgsrc.split("/");

if(vSplitVal[vSplitVal.length-1]=='home_icon_down.gif')
{
document.getElementById(btnConrtol).src="images/
home_icon_right.gif"

document.getElementById(divControl).style.position="absolute";//
absolute

document.getElementById(divControl).style.visibility="hidden";
}
else
{
document.getElementById(btnConrtol).src="images/
home_icon_down.gif"

document.getElementById(divControl).style.position="relative";//
relative

document.getElementById(divControl).style.visibility="visible";

}
return false;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top