میتونید با یک ترفند رویدادهای تکست باکس را برای سلول گریدویو بسازید
private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (dataGridView1.CurrentCell.ColumnIndex == dataGridView1.Columns["Column1"].Index)
{
TextBox txt = e.Control as TextBox;
txt.KeyPress += new KeyPressEventHandler(txt_KeyPress);
}
}
void txt_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = !(char.IsControl(e.KeyChar) || char.IsDigit(e.KeyChar));
}
به جای Column1 نام ستون مورد نظر را بذارید.
در رویداد EditingControlShowing میتونید سلول مورد نظر را با استفاده از e به کنترلهای دیگر مثلا تکست باکس و یا کمبوباکس و ... کست کنید تا بتونید رویدادهای کنترلهای دیگر رو شبیه سازی کنید.