diff --git a/Radzen.Blazor/RadzenDataGrid.razor.cs b/Radzen.Blazor/RadzenDataGrid.razor.cs index d9b3b2e3e80..bae7e69a3fe 100644 --- a/Radzen.Blazor/RadzenDataGrid.razor.cs +++ b/Radzen.Blazor/RadzenDataGrid.razor.cs @@ -807,7 +807,7 @@ internal RenderFragment DrawNumericFilter(RadzenDataGridColumn column, bo builder.AddAttribute(2, "ShowUpDown", column.ShowUpDownForNumericFilter()); builder.AddAttribute(3, "Style", "width:100%"); builder.AddAttribute(4, "InputAttributes", new Dictionary(){ { "aria-label", column.Title + $"{(!isFirst ? " second " : " ")}filter value " + (isFirst ? column.GetFilterValue() : column.GetSecondFilterValue()) } }); - builder.AddAttribute(5, "id", getFilterInputId(column)); + builder.AddAttribute(5, "id", getFilterInputId(column) + (isFirst ? "f" : "s")); Action action; if (force) diff --git a/Radzen.Blazor/RadzenDataGridHeaderCell.razor b/Radzen.Blazor/RadzenDataGridHeaderCell.razor index c6997b159bb..b5cd4224694 100644 --- a/Radzen.Blazor/RadzenDataGridHeaderCell.razor +++ b/Radzen.Blazor/RadzenDataGridHeaderCell.razor @@ -340,10 +340,16 @@ else { if (PropertyAccess.IsNumeric(Column.FilterPropertyType) && !(PropertyAccess.IsEnum(Column.FilterPropertyType) || PropertyAccess.IsNullableEnum(Column.FilterPropertyType))) { - var inputValue = await Grid.GetJSRuntime().InvokeAsync("Radzen.getNumericValue", Grid.getFilterInputId(Column)); - if (!object.Equals($"{Column.GetFilterValue()}", inputValue)) + var firstInputValue = await Grid.GetJSRuntime().InvokeAsync("Radzen.getNumericValue", Grid.getFilterInputId(Column) + "f"); + if (!object.Equals($"{Column.GetFilterValue()}", firstInputValue)) { - Column.SetFilterValue(!string.IsNullOrEmpty(inputValue) ? Convert.ChangeType(inputValue, Column.FilterPropertyType) : null); + Column.SetFilterValue(!string.IsNullOrEmpty(firstInputValue) ? Convert.ChangeType(firstInputValue, Column.FilterPropertyType) : null); + } + + var secondInputValue = await Grid.GetJSRuntime().InvokeAsync("Radzen.getNumericValue", Grid.getFilterInputId(Column) + "s"); + if (!object.Equals($"{Column.GetSecondFilterValue()}", secondInputValue)) + { + Column.SetFilterValue(!string.IsNullOrEmpty(secondInputValue) ? Convert.ChangeType(secondInputValue, Column.FilterPropertyType) : null, false); } }