hi
i have gridview filled with datatble,when data is loaded ,the user can edit some column,one of this column must have only 3 value(OK,NOK,Waiting Data),for this i use validating event like this:
for more flexibility, i want to use the same thing but with combobox,i saw all tu tutorial and documentation for using combobox with gridvieuw but doesn't work for me,some one can help me plz
thx in advance
i have gridview filled with datatble,when data is loaded ,the user can edit some column,one of this column must have only 3 value(OK,NOK,Waiting Data),for this i use validating event like this:
private void Gridswap_CellValidating(object sender, GridViewCellValidatingEventArgs e)
{
if (e.Cell.Column.UniqueName == "KPI Status( OK &NOK )OPTIM")
{
if (e.NewValue.ToString() != "OK" && e.NewValue.ToString() != "NOK" && e.NewValue.ToString() != "Waiting KPI")
{
e.IsValid = false;
MessageBox.Show("The value must be OK,NOK or Waiting Data");
}
}
}
thx in advance