H
hazz
how do I call a method from CellClick if a user performs a single click on a
datagridview row and the same time allowing a double click event to be
passed onto CellDoubleClick if the user performs a double click action? As
it is now, the CellClick traps the single click event but does not allow a
double click to pass through to the CellDoubleClick event.
I do have to call a method from the CellClick event so I can't remove that
method.
Thanks, -hazz
private void dataGridView1_CellClick(object sender,DataGridViewCellEventArgs
e)
{
bSingleCellClick = true;
foo (arg1);
}
private void dataGridView1_CellDoubleClick(object sender,
DataGridViewCellEventArgs e)
{
if (bSingleCellClick)
{
ShowCustomerID(dataGridView1.CurrentCell.ColumnIndex);
} else
{
Form2 f = new Form2();
f.Show();
}
}
datagridview row and the same time allowing a double click event to be
passed onto CellDoubleClick if the user performs a double click action? As
it is now, the CellClick traps the single click event but does not allow a
double click to pass through to the CellDoubleClick event.
I do have to call a method from the CellClick event so I can't remove that
method.
Thanks, -hazz
private void dataGridView1_CellClick(object sender,DataGridViewCellEventArgs
e)
{
bSingleCellClick = true;
foo (arg1);
}
private void dataGridView1_CellDoubleClick(object sender,
DataGridViewCellEventArgs e)
{
if (bSingleCellClick)
{
ShowCustomerID(dataGridView1.CurrentCell.ColumnIndex);
} else
{
Form2 f = new Form2();
f.Show();
}
}