title: dataGridView Context menu function
body: <p>I have added this code to my forum:</p>
  
  <pre><code>    private void dataGridView1_MouseClick(object sender, MouseEventArgs e)
      {
          if (e.Button == MouseButtons.Right)
          {
              ContextMenu a = new ContextMenu();
              a.MenuItems.Add(new MenuItem("Google"));
              a.MenuItems.Add(new MenuItem("Yahoo"));
              int currentMouseOverRow = dataGridView1.HitTest(e.X, e.Y).RowIndex;
              if (currentMouseOverRow &gt;= 0)
              {
                  a.MenuItems.Add(new MenuItem(string.Format("", currentMouseOverRow.ToString())));
              }
              a.Show(dataGridView1, new Point(e.X, e.Y));
          }
      }
  
      private void dataGridView1_CellMouseEnter(object sender, DataGridViewCellEventArgs e)
      {
          currentMouseOverRow = e.RowIndex;
      }
  
      private void dataGridView1_CellMouseLeave(object sender, DataGridViewCellEventArgs e)
      {
          currentMouseOverRow = -1;
      }
  </code></pre>
  
  <p>But how do I add the function to the context menu option?</p>
  
  <p>For google,</p>
  
  <pre><code>    Process.Start("https://www.google.com");
  </code></pre>
  
  <p>For yahoo,</p>
  
  <pre><code>    Process.Start("https://www.yahoo.com");
  </code></pre>
  
  <p>etc.</p>