title: How to check if a GridView contains a Button field or not
body: <p>My Question is:</p>
  
  <p>I have a GridView and it contains a column (Button field). Now I want to know on runtime that wheather my Grid contains a Button field or not.</p>
  
  <pre><code> foreach (DataColumn col in Table.Columns)
                  {
                      ButtonField btnfield = new ButtonField();
                      btnfield.ButtonType = ButtonType.Image;
  
                      if (grid.Columns.Contains(btnfield))
                      {
                          grid.Columns.RemoveAt(grid.Columns.IndexOf(btnfield));
                      }
  
                  }
  </code></pre>
  
  <p>This code does not work. I want to achieve this task without Row Data Bound.</p>
  
  <p>Regards Zuhaib</p>