hi there,
i have a email textbox in the datagrid view, when i try to validate the datagrid view cell in the cellvalidating event, the current value is not take to the email varialbe, it is showed as null. y is that.
how can i solve this.
if(e.ColumnIndex == 2)
{
int row = dgvSubContractor.CurrentCell.RowIndex;
String email = string.Format("" + dgvSubContractor[2, e.RowIndex].Value);
if(email != null)
{
if (pp.validateSubEmial(email))
MessageBox.Show("email address is unique, enter different email address");
else
{
if (!IsValidEmailAddress(email))
MessageBox.Show("Invalid email address");
else
MessageBox.Show("valid email");
}
}
y is the value entered not taken tothe variable
thankxxxxxxx