nima.ni
شنبه 25 شهریور 1391, 09:54 صبح
با سلام
من در رویداد Cellvalidatingیک سری شروط را چک می کنم می خواهم اگر هر شرط برقرار نبود از errortext استفاده کنم اما هیچ آیکون خطایی در گرید نمایش داده نمی شود.به طور مثال:
if (e.FormattedValue.ToString().Trim().Length > 1)
{
dataGridView1.EndEdit();
dataGridView1[e.ColumnIndex, e.RowIndex].Value = string.Empty;
dataGridView1[e.ColumnIndex, e.RowIndex].ErrorText = "ERRRORRR";
e.Cancel = true;
}
من در رویداد Cellvalidatingیک سری شروط را چک می کنم می خواهم اگر هر شرط برقرار نبود از errortext استفاده کنم اما هیچ آیکون خطایی در گرید نمایش داده نمی شود.به طور مثال:
if (e.FormattedValue.ToString().Trim().Length > 1)
{
dataGridView1.EndEdit();
dataGridView1[e.ColumnIndex, e.RowIndex].Value = string.Empty;
dataGridView1[e.ColumnIndex, e.RowIndex].ErrorText = "ERRRORRR";
e.Cancel = true;
}