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

Discussion in 'ASP .Net Web Controls' started by santosh, Dec 5, 2007.

  1. santosh

    santosh Guest

    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;
    }
    santosh, Dec 5, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shuo Xiang

    Stack space, global space, heap space

    Shuo Xiang, Jul 9, 2003, in forum: C Programming
    Replies:
    10
    Views:
    2,871
    Bryan Bullard
    Jul 11, 2003
  2. Christian Seberino
    Replies:
    21
    Views:
    1,631
    Stephen Horne
    Oct 27, 2003
  3. Ian Bicking
    Replies:
    2
    Views:
    987
    Steve Lamb
    Oct 23, 2003
  4. Ian Bicking
    Replies:
    2
    Views:
    711
    Michael Hudson
    Oct 24, 2003
  5. Ben C
    Replies:
    6
    Views:
    2,134
    Leif K-Brooks
    Jan 28, 2007
Loading...

Share This Page