c# - How to call Datagridview cell double click event from a button? - Stack Overflow

PHOTO EMBED

Wed May 11 2022 15:28:13 GMT+0000 (Coordinated Universal Time)

Saved by @javicinhio #cs

private void btnChoose_Click(object sender, EventArgs e)
{

    MouseEventArgs b = new MouseEventArgs(System.Windows.Forms.MouseButtons.Left, 2, 
        MousePosition.X, MousePosition.Y, 0);
    DataGridViewCellMouseEventArgs a = new DataGridViewCellMouseEventArgs(0, 0, 
        MousePosition.X, MousePosition.Y, b);
    dataGridView1_CellMouseDoubleClick(sender, a);
}
content_copyCOPY

https://stackoverflow.com/questions/39015557/how-to-call-datagridview-cell-double-click-event-from-a-button