title: What's the best way to get the DropDown event of a ComboBox in a DataGridView
body: <p>Say I have a DataGridView in which I dynamically build up a ComboBox column and add values to it. What's the best approach to trapping when the user clicks on the drop down button to show the drop down list. If I simply use CellClick on the DataGridView, I get that event even if the user doesn't actually click on the drop down button.</p>
  
  <p>So far what I've done is basically inherit from DataGridViewComboBoxCell and overrode the DropDownWidthProperty. In the getter I fire off a DropDown event. This works, but feels very "hacky". Any other suggestions?</p>
  
  <pre><code> using System;
      using System.Windows.Forms;
  
  public class DataGridViewEventComboBoxCell : DataGridViewComboBoxCell
  {
      private bool dropDownShown = false;
      public event EventHandler BeforeDropDownShown;
  
      private void OnBeforeDropDownShown()
      {
          if (this.BeforeDropDownShown != null)
          {
              this.BeforeDropDownShown(this, new EventArgs());
          }
      }
  
  
      public override int DropDownWidth
      {
          get
          {
              if (!dropDownShown) //this boolean is here because I only need to trap it the very first time
              {
                  this.OnBeforeDropDownShown();
                  dropDownShown = true;
              }
              return base.DropDownWidth;
          }
          set
          {
              base.DropDownWidth = value;
          }
      }
  
  
  }
  </code></pre>