I have a buttoncolumn in a dgv and the cellcontentclick event opens up a
dialog. The end result: the 'OK' value will edit an editable cell in the
dgv.

The value will not allow me to enter into editmode but will let me edit the
cell. any ideas???

--- code ----

private void dataGridView1_CellContentClick(object sender,
DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex].Name == "Btn")
{
DialogResult result = folderBrowserDialog1.ShowDialog();
if (result == DialogResult.OK)
{
try
{
dataGridView1.BeginEdit(true);
//dataGridView1.Rows[e.RowIndex].Cells[5].Value =
folderBrowserDialog1.SelectedPath;
//dataGridView1.CancelEdit();

if (dataGridView1.IsCurrentCellInEditMode)
{
dataGridView1.Rows[e.RowIndex].Cells[5].Value =
folderBrowserDialog1.SelectedPath;
dataGridView1.CancelEdit();
}
else
{
Console.WriteLine("Fail to enter editmode");
}
}
catch(Exception z)
{
Trace.WriteLine(z.Message);
}
}
}
}