I have DataGridView with three column and all three columns are DataGridViewTextBoxColumn and now I want to select cell text by mouse. I tried the following:
dgView.ReadOnly = false;
private void dgView_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (e.Control is TextBox)
{
(e.Control as TextBox).ReadOnly = true;
}
}
But this trick is not working.
dgView.ReadOnly = false;
private void dgView_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (e.Control is TextBox)
{
(e.Control as TextBox).ReadOnly = true;
}
}
But this trick is not working.