title: Locating Button in Gridview Header
body: <p>Greetings!!
  I have programmatically created a button in Gridview header and used CSS to align it to the Left corner of Gridview, but then whenever the Gridview expands the button also moves in the Gridview. Can somebody guide me on how to align the button to left and should be static even when the gridview expands? I have attached screenshots for reference. It would be grateful if anybody provides me a solution. Thanks in advance!!</p>
  
  <p>Code used for creating the button:</p>
  
  <pre><code> GridViewRow row=newGridViewRow(0,0,DataControlRowType.Header,DataControlRowState.Normal);
  TableHeaderCell cell = new TableHeaderCell();
              Button header_button = new Button();
              header_button.Text = "Add";
              header_button.Click += new EventHandler(this.GreetingBtn_Click);
              header_button.CssClass += "header_button";
              cell.Controls.Add(header_button);
              cell.ColumnSpan = 11;                
              row.Controls.Add(cell);
              GridView1.HeaderRow.Parent.Controls.AddAt(0, row); 
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.header_button                  
  {
  background-color:#007AB4;  
  border-radius: 4px;
  color:#FAFAFA;
  font-family:Sans-Serif;
  font-size:11px;
  height:30px;
  width:50px;
  margin-bottom:auto;
  }
  </code></pre>
  
  <p>Screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/AQGUA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AQGUA.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/1ExDK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1ExDK.png" alt="enter image description here"></a></p>
  
  <p>As you can see in the second screenshot the button has been moved when the checkbox list is added.</p>