title: Hiding/Unhiding Control in Gridview’s column - shifting problem
body: <p>This is a follow up to my previous question:
  <a href="https://stackoverflow.com/questions/1021983/hiding-unhiding-control-in-gridviews-column-using-javascript">link text</a></p>
  
  <p>In gridview's column i have a linkbutton and a label under it.</p>
  
  <p>I want to hide/unhide label when linkbutton is clicked. I use javascript because i don't want any postbacks.
  The code:</p>
  
  <pre><code>protected void gvwComments_RowDataBound(object sender, GridViewRowEventArgs e)
      {
          if (e.Row.RowType == DataControlRowType.DataRow)
          {
              LinkButton lButton =  ((LinkButton)e.Row.Cells[2].FindControl("lbtnExpand"));
              Label label = ((Label)e.Row.Cells[2].FindControl("lblBody"));
              lButton.Attributes.Add("onclick",  string.Format("HideLabel('{0}'); return false;", label.ClientID));
  
          }
      }
  
  
  
  function HideLabel(button) {
  
              var rowObj = document.getElementById(button);
  
  
              if (rowObj.style.display == "none") {
                  rowObj.style.display = "block";
  
              }
              else {
                  rowObj.style.display = "none";
  
              }
  
          }
  </code></pre>
  
  <p>The problem is that when I unhide the label by clicking on button, linkbutton is shifted a a bit upper it's original position in the cell.
  Is it possible to preserve linkbutton's position in the gridviews cell?</p>