I use a UltraMasedEdit ultraMaskEdit1 as the EditorComponent of a column. It seems there's no way for me to prevent the warning messagebox when the row is updating with an illeagal input string in the column according to the InputMask of ultraMaskEdit1. Is there?
Hello,
You could try using a code like the following in order to achieve the desired behavior:
private void ultraGrid1_CellDataError(object sender, Infragistics.Win.UltraWinGrid.CellDataErrorEventArgs e) { e.RaiseErrorEvent = false; e.StayInEditMode = false; }
Please do not hesitate to contact us if you need any additional assistance.
That'll do. Thanks.
One more issue, is there any way to keep a uncompleted masked input string? say, I use -#d ##:##:## as the maskstring and write the following:
private void ultraGrid1_CellDataError(object sender, Infragistics.Win.UltraWinGrid.CellDataErrorEventArgs e) { e.RaiseErrorEvent = false; e.StayInEditMode = false; e.RestoreOriginalValue = false; }
private void ultraMaskedEdit1_MaskValidationError(object sender, Infragistics.Win.UltraWinMaskedEdit.MaskValidationErrorEventArgs e) { e.Revert = false; e.RetainFocus = false; e.Beep = false; }
if not all #s are fill with numbers, "-1d 11:__:__" for example., the uncompleted string could be kept in the ultraMaskedEdit1, but not in the cells, how can I keep them in cells?
Hello anakincn,
What you could do here is to keep the values in your own collection for every cell on 'CellDataError'. The values could not be kept by the 'WinGrid' control because they are not correct and therefore are being removed which is expected and default behavior.
Thanks, very helpful