This is a migrated thread and some comments may be shown as answers.

convert column type

0 Answers 15 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Amine
Top achievements
Rank 1
Amine asked on 23 Feb 2014, 06:11 PM
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:

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");
              
}               
           }
       }
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

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Amine
Top achievements
Rank 1
Share this question
or