Product: Telerik UI for WinForms, RadGridView Version: 2026.4.1111 (2026 Q4). Regression: not present in 2026.3.812 (Q3), which has no GridViewDataAnnotationHelper. Framework: .NET Framework 4.8, Windows 11 Attachment: GridAnnotationRepro.zip, a minimal WinForms project with a manual repro and a scripted --selftest mode
Summary
2026 Q4 added data annotation validation to the end of a cell edit: GridViewEditManager.EndEditCore → RaiseCellValidatingEvent(..., validateAnnotations: true) → GridViewDataAnnotationHelper.TryValidate. That validation also runs on the filter row. It checks the text typed in a filter cell against the bound property's ValidationAttributes as if it were a value for that property. When the check fails, the editor silently stays open. The grid then refuses row changes, and the parent form refuses to close. No exception is thrown, CellValidating is not cancelled, and the user sees no message. Only Esc recovers.
With a [Required] string property, just clicking into its empty filter box and clicking elsewhere locks the form.
Steps to reproduce
- Bind a
RadGridViewwithEnableFiltering = trueto aBindingList<T>whose type has a[Required] public string Name { get; set; }property. - Run the form, click into the filter cell under Name, and leave it empty.
- Click a data row, or call
Close()on the form.
Expected: the filter editor closes (an empty filter means "no filter"), the row is selected, and the form closes. This is the 2026 Q3 behavior.
Actual:
RadGridView.EndEdit()returnsfalseand the editor stays open.- The data row highlights on hover but cannot be selected (
CurrentRowassignment is refused). Form.Close()is refused because form validation fails.CellValidatingfires withCancel = false. The only trace isErrorText = "The Name field is required."on the filter cell, which is not displayed.
Scripted results on 2026.4.1111.48 (from the attached --selftest)
| Case | Result |
|---|---|
Filter row, [Required] Name, left empty | Locked: EndEdit=false, row change refused, Close refused |
Filter row, [Required(AllowEmptyStrings = true)] Nickname, left empty | Locked |
Filter row, [EmailAddress] Email, partial search text "alice" | Locked ("not a valid e-mail address") |
| Filter row, City (no attributes), left empty | OK (control) |
Data cell, [Required] Name = "", opened and left without changes | Locked |
Data cell, [Required(AllowEmptyStrings = true)] Nickname "Al", cleared to "" | Locked |
Data cell, [Required(AllowEmptyStrings = true)] Nickname = "", opened and left without changes | OK |
| Data cell, City (no attributes), opened unchanged / cleared to "" | OK (controls) |
Problems we see
- Filter cells are validated as model values. Filter input is search criteria, not a property value. Any
[Required],[MinLength],[RegularExpression],[EmailAddress],[Phone],[Range], etc. on a bound property makes ordinary filtering (an empty box, a partial value, an out-of-range value used to find bad rows) lock the grid.TryValidateshould not run forGridViewFilteringRowInfo/GridFilterCellElement. - The failure is silent and spreads. The editor stays open with no visible message, no exception, and no cancelled
CellValidating. As a result, row changes and the parent form'sClose()are refused. An application has no event to see this happening or handle it. AllowEmptyStrings = truehas no effect on editor values.EndEditCoreconvertsstring.Emptytonullbefore validating, so a user clearing a cell (or an empty filter box) fails even when the model explicitly allows empty strings.- Unchanged cells are validated too. Opening a cell that already holds an invalid value (for example legacy data) and leaving it without typing anything locks the editor. The user only clicked into the cell, and the only way out is Esc.
- There is no opt-out. The feature is on by default in a quarterly release, and we found no property to disable it. We worked around it by subclassing
GridViewEditManager, overridingEndEditCoreto raiseCellValidatingourselves, then callingbase.EndEditCore(false, cancel), and installing it throughRadGridViewElement.EditorManager. This relies on internal behavior.
Requests
- Skip annotation validation for the filter row.
- Add a property to turn annotation validation off (per grid, or
RadGridView-wide), and consider defaulting it to off for existing apps. - When annotation validation fails, surface it: set
CellValidatingEventArgs.Cancel = trueso handlers can see and override it, or show the error. Don't silently keep the editor open. - Honor
RequiredAttribute.AllowEmptyStringsby validating the editor's value before the""→nullconversion.