gustavnavar / Grid.Blazor

Grid component with CRUD for Blazor (client-side and server-side) and ASP.NET Core MVC
GNU Lesser General Public License v2.1
696 stars 134 forks source link

Error when table filter is invalid #394

Closed BahdanauYa closed 10 months ago

BahdanauYa commented 1 year ago

Actual for the date column when filter value is empty and you click Apply and for columns of numbers when you enter letters and click Apply.

.HandleServerErrors(false, false) is not a solution, it's just hiding the problem

Expected Behavior: no error, invalid filter value cleared and not applied

1_2RdNRoDJmqfArWaViXal-g 1_2RdNRoDJmqfArWaViXal-g

gustavnavar commented 1 year ago

It only happens in the case of OData back-end.

When GridMvcCore is used it doesn't return any error: Captura (193)

I can not change the behavior when OData is used because it depends on the ODataController implementation. In fact ODataController returns the error even before any code in the controller action is executed.

BahdanauYa commented 1 year ago

Anyway, this is a possibility of a crash. Maybe it's possible to change control behavior - don't send invalid data (letters for number field and null/empty for Date) from ui control to backend

gustavnavar commented 1 year ago

GridBlazor 4.0.6 does not send invalid data when using OData back-end