Hi,
I’m here to figure out the validation in GridWeb control.
Let’s assume we have a cell with a validation defined as follow:
//Create cell validation
ValidationCollection validations = worksheet.Validations;
CellArea ca = new CellArea() { StartRow = cell.Row, EndRow = cell.Row, StartColumn = cell.Column, EndColumn = cell.Column };
Validation validation = validations[validations.Add(ca)];
validation.Type = Aspose.Cells.ValidationType.List;
validation.Operator = OperatorType.Between;
validation.InCellDropDown = true;
validation.Formula1 = string.Join(",", values);
validation.ErrorMessage = "Value not valid";
validation.ErrorTitle = "Error";
GridWeb displays a dropdown with the different possible values. Everything looks correct.
However when I type a “wrong” value in this cell, I got no error message. The only thing I can see is red cross in the cell.
Moreover the OnCellModifiedOnAjax handler is not called. This means that I have no possibility to have a custom handling of this error.
In fact, when the value is not “correct” I need to display a dialog with an error message and automatically restore cell to its previous value. That is exactly the Excel behaviour so why it’s not the same for GridWeb ?
Thanks,