void spreadsheetControl_CellEndEdit(object sender, DevExpress.XtraSpreadsheet.SpreadsheetCellValidatingEventArgs e)
 {
     if (e.ColumnIndex == 4 && e.RowIndex == 5)
     {
         int value;
         if (!int.TryParse(e.EditorText, out value) || value < 1 || value > 10)
         {
             DXMessageBox.Show("Please enter a whole number of years from 1 to 10");
             e.Cancel = true;
         }
     }
 }
Exemplo n.º 2
0
        private void SpreadsheetControl_CellEndEdit(object sender, DevExpress.XtraSpreadsheet.SpreadsheetCellValidatingEventArgs e)
        {
            if (e.ColumnIndex == 0)
            {
                if (string.IsNullOrEmpty(e.EditorText))
                {
                    return;
                }

                float value = float.Parse(e.EditorText);
                if (value < 100 || value > 2000)
                {
                    e.Cancel = true;
                    XtraMessageBox.Show("The entered value must be >=100 and <=2000");
                }
            }
        }
Exemplo n.º 3
0
Arquivo: M16.cs Projeto: TPF-TUW/MDS
 private void spsVessel_CellEndEdit(object sender, DevExpress.XtraSpreadsheet.SpreadsheetCellValidatingEventArgs e)
 {
 }