From 124033d122ba981f554498c3b8cefdd9a0bbe9e7 Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Fri, 15 Nov 2024 09:11:50 +0200 Subject: [PATCH] DataGrid column numeric advanced filter improved --- Radzen.Blazor/RadzenDataGrid.razor.cs | 29 +-------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/Radzen.Blazor/RadzenDataGrid.razor.cs b/Radzen.Blazor/RadzenDataGrid.razor.cs index a43892eb2f6..9c988b36f7e 100644 --- a/Radzen.Blazor/RadzenDataGrid.razor.cs +++ b/Radzen.Blazor/RadzenDataGrid.razor.cs @@ -807,34 +807,7 @@ internal RenderFragment DrawNumericFilter(RadzenDataGridColumn column, bo builder.AddAttribute(3, "Change", eventCallbackGenericCreate.Invoke(this, new object[] { this, eventCallbackGenericAction.Invoke(this, new object[] { action }) })); - if (FilterMode == FilterMode.Advanced) - { - builder.AddAttribute(4, "oninput", EventCallback.Factory.Create(this, args => - { - var value = $"{args.Value}"; - object filterValue = null; - - if (!string.IsNullOrWhiteSpace(value)) - { - try - { - filterValue = Convert.ChangeType(value, Nullable.GetUnderlyingType(type)); - } - catch (Exception) - { - filterValue = null; - } - } - - column.SetFilterValue(filterValue, isFirst); - SaveSettings(); - })); - builder.AddAttribute(5, "Disabled", !column.CanSetFilterValue()); - } - else if (FilterMode == FilterMode.SimpleWithMenu) - { - builder.AddAttribute(4, "Disabled", !column.CanSetFilterValue()); - } + builder.AddAttribute(4, "Disabled", !column.CanSetFilterValue()); builder.CloseComponent(); });