From 5ed3ec44da985f0cef2807006d9e74af1d731037 Mon Sep 17 00:00:00 2001 From: David Moreira Date: Wed, 25 Oct 2023 10:13:24 +0100 Subject: [PATCH] DataGridColumn: DataGridColumnFilterMethod with support for contextual filter | Numerc | Date | Greater or Less Than (#5097) * DataGridColumn | DataGridColumnFilterMethod with support for contextual filter | Numerc | Date | Greater or Less Than * Translations for new the Filter Methods * Release notes for DataGridColumnFilterMethod * Docs | Update FilterMethod type * formating --------- Co-authored-by: Mladen Macanovic --- .../Pages/Tests/DataGrid/FilterColumn.razor | 6 +- .../Models/Snippets.generated.cs | 48 ++-- .../DataGridColumnFilteringExampleCode.html | 2 +- ...dFilterModeColumnFilteringExampleCode.html | 2 +- ...odeColumnTemplateFilteringExampleCode.html | 44 ++- .../Extensions/DataGrid/DataGridApi.razor | 2 +- .../DataGridColumnFilteringExample.razor | 2 +- ...GridFilterModeColumnFilteringExample.razor | 2 +- ...erModeColumnTemplateFilteringExample.razor | 44 ++- .../News/2023-11-30-release-notes-140.razor | 23 ++ .../Contexts/FilterColumnContext.cs | 6 +- .../Blazorise.DataGrid/DataGrid.razor.cs | 256 +++++++++++++++++- .../Blazorise.DataGrid/DataGridColumn.cs | 18 +- .../Enums/DataGridColumnFilterMethod.cs | 17 ++ .../Enums/DataGridFilterMethod.cs | 2 +- .../Models/DataGridColumnInfo.cs | 4 +- .../Resources/Localization/DataGrid/cs.json | 6 +- .../Resources/Localization/DataGrid/da.json | 6 +- .../Resources/Localization/DataGrid/de.json | 6 +- .../Resources/Localization/DataGrid/en.json | 6 +- .../Resources/Localization/DataGrid/es.json | 6 +- .../Resources/Localization/DataGrid/fr.json | 6 +- .../Resources/Localization/DataGrid/hr.json | 6 +- .../Resources/Localization/DataGrid/is.json | 6 +- .../Resources/Localization/DataGrid/it.json | 6 +- .../Resources/Localization/DataGrid/nl.json | 6 +- .../Resources/Localization/DataGrid/pl.json | 6 +- .../Resources/Localization/DataGrid/pt.json | 6 +- .../Resources/Localization/DataGrid/ru.json | 6 +- .../Resources/Localization/DataGrid/sk.json | 6 +- .../Resources/Localization/DataGrid/tr.json | 6 +- .../Resources/Localization/DataGrid/zh.json | 6 +- .../_DataGridMenuFilter.razor | 35 ++- 33 files changed, 502 insertions(+), 107 deletions(-) create mode 100644 Source/Extensions/Blazorise.DataGrid/Enums/DataGridColumnFilterMethod.cs diff --git a/Demos/Blazorise.Demo/Pages/Tests/DataGrid/FilterColumn.razor b/Demos/Blazorise.Demo/Pages/Tests/DataGrid/FilterColumn.razor index d0a1ce4f19..e45dcfdf21 100644 --- a/Demos/Blazorise.Demo/Pages/Tests/DataGrid/FilterColumn.razor +++ b/Demos/Blazorise.Demo/Pages/Tests/DataGrid/FilterColumn.razor @@ -15,7 +15,7 @@ FilterMethod="DataGridFilterMethod.Contains" FilterMode="DataGridFilterMode.Menu"> - + @@ -30,8 +30,8 @@ - - + + diff --git a/Documentation/Blazorise.Docs/Models/Snippets.generated.cs b/Documentation/Blazorise.Docs/Models/Snippets.generated.cs index f4804c6341..32834875e5 100644 --- a/Documentation/Blazorise.Docs/Models/Snippets.generated.cs +++ b/Documentation/Blazorise.Docs/Models/Snippets.generated.cs @@ -6342,7 +6342,7 @@ protected override async Task OnInitializedAsync() Data=""@employeeList"" Responsive Filterable> - + @code{ @@ -6836,7 +6836,7 @@ protected override async Task OnInitializedAsync() Responsive Filterable FilterMode=""DataGridFilterMode.Menu""> - + ((Gender)x).Code"" TextField=""(x) => ((Gender)x).Description"" /> @@ -6851,21 +6851,35 @@ protected override async Task OnInitializedAsync() Data=""@employeeList"" Responsive Filterable - FilterMode=""DataGridFilterMode.Menu""> - - - - ((Gender)x).Code"" TextField=""(x) => ((Gender)x).Description"" /> - - - - - { context.FilterMethodChanged.InvokeAsync(e); }""> + @{ + var isNumericOrDate = context.Column.ColumnType == DataGridColumnType.Numeric || context.Column.ColumnType == DataGridColumnType.Date; + } + + @if ( !isNumericOrDate ) + { + Contains + Starts With + Ends With + } + Equals + Not Equals + @if ( isNumericOrDate ) + { + Greater Than + Greater Than Or Equal + Less Than + Less Than Or Equal + } diff --git a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Code/DataGridColumnFilteringExampleCode.html b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Code/DataGridColumnFilteringExampleCode.html index a675242de6..4370b53d9b 100644 --- a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Code/DataGridColumnFilteringExampleCode.html +++ b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Code/DataGridColumnFilteringExampleCode.html @@ -5,7 +5,7 @@ Data="@employeeList" Responsive Filterable> - <DataGridColumn Field="@nameof( Employee.FirstName )" Caption="Name" Editable="false" FilterMethod="DataGridFilterMethod.StartsWith"></DataGridColumn> + <DataGridColumn Field="@nameof( Employee.FirstName )" Caption="Name" Editable="false" FilterMethod="DataGridColumnFilterMethod.StartsWith"></DataGridColumn> </DataGrid>
diff --git a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Code/DataGridFilterModeColumnFilteringExampleCode.html b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Code/DataGridFilterModeColumnFilteringExampleCode.html
index a512b7644b..0097674114 100644
--- a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Code/DataGridFilterModeColumnFilteringExampleCode.html
+++ b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Code/DataGridFilterModeColumnFilteringExampleCode.html
@@ -6,7 +6,7 @@
           Responsive
           Filterable
           FilterMode="DataGridFilterMode.Menu">
-    <DataGridColumn Field="@nameof( Employee.FirstName )" Caption="First Name" Editable="false" FilterMethod="DataGridFilterMethod.StartsWith"></DataGridColumn>
+     <DataGridColumn Field="@nameof( Employee.FirstName )" Caption="First Name" Editable="false" FilterMethod="DataGridColumnFilterMethod.StartsWith"></DataGridColumn>
     <DataGridColumn Field="@nameof( Employee.LastName )" Caption="Last Name" Editable="false"></DataGridColumn>
     <DataGridSelectColumn TItem="Employee" Field="@nameof( Employee.Gender )" Caption="Gender" Editable Data="EmployeeData.Genders" ValueField="(x) => ((Gender)x).Code" TextField="(x) => ((Gender)x).Description" />
 </DataGrid>
diff --git a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Code/DataGridFilterModeColumnTemplateFilteringExampleCode.html b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Code/DataGridFilterModeColumnTemplateFilteringExampleCode.html
index f9128c2352..7600858076 100644
--- a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Code/DataGridFilterModeColumnTemplateFilteringExampleCode.html
+++ b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Code/DataGridFilterModeColumnTemplateFilteringExampleCode.html
@@ -5,21 +5,35 @@
           Data="@employeeList"
           Responsive
           Filterable
-          FilterMode="DataGridFilterMode.Menu">
-    <DataGridColumns>
-        <DataGridColumn Field="@nameof( Employee.FirstName )" Caption="First Name" Editable="false" FilterMethod="DataGridFilterMethod.StartsWith"></DataGridColumn>
-        <DataGridColumn Field="@nameof( Employee.LastName )" Caption="Last Name" Editable="false"></DataGridColumn>
-        <DataGridSelectColumn TItem="Employee" Field="@nameof( Employee.Gender )" Caption="Gender" Editable Data="EmployeeData.Genders" ValueField="(x) => ((Gender)x).Code" TextField="(x) => ((Gender)x).Description" />
-    </DataGridColumns>
-    <FilterMenuTemplate>
-        <Row>
-            <Column ColumnSize="ColumnSize.Is4">
-                <Select TValue="DataGridFilterMethod" SelectedValue="@context.GetFilterMethod()" SelectedValueChanged="e => { context.FilterMethodChanged.InvokeAsync(e); }">
-                    <SelectItem TValue="DataGridFilterMethod" Value="@DataGridFilterMethod.Contains">Contains</SelectItem>
-                    <SelectItem TValue="DataGridFilterMethod" Value="@DataGridFilterMethod.StartsWith">Starts With</SelectItem>
-                    <SelectItem TValue="DataGridFilterMethod" Value="@DataGridFilterMethod.EndsWith">Ends With</SelectItem>
-                    <SelectItem TValue="DataGridFilterMethod" Value="@DataGridFilterMethod.Equals">Equals</SelectItem>
-                    <SelectItem TValue="DataGridFilterMethod" Value="@DataGridFilterMethod.NotEquals">Not Equals</SelectItem>
+           FilterMode="DataGridFilterMode.Menu">
+     <DataGridColumns>
+         <DataGridColumn Field="@nameof( Employee.FirstName )" Caption="First Name" Editable="false" FilterMethod="DataGridColumnFilterMethod.StartsWith"></DataGridColumn>
+         <DataGridColumn Field="@nameof( Employee.LastName )" Caption="Last Name" Editable="false"></DataGridColumn>
+         <DataGridSelectColumn TItem="Employee" Field="@nameof( Employee.Gender )" Caption="Gender" Editable Data="EmployeeData.Genders" ValueField="(x) => ((Gender)x).Code" TextField="(x) => ((Gender)x).Description" />
+     </DataGridColumns>
+     <FilterMenuTemplate>
+         <Row>
+             <Column ColumnSize="ColumnSize.Is4">
+                 <Select TValue="DataGridColumnFilterMethod" SelectedValue="@context.GetFilterMethod()" SelectedValueChanged="e => { context.FilterMethodChanged.InvokeAsync(e); }">
+                    @{
+                        var isNumericOrDate = context.Column.ColumnType == DataGridColumnType.Numeric || context.Column.ColumnType == DataGridColumnType.Date;
+                    }
+
+                    @if ( !isNumericOrDate )
+                    {
+                        <SelectItem TValue="DataGridColumnFilterMethod" Value="@DataGridColumnFilterMethod.Contains">Contains</SelectItem>
+                        <SelectItem TValue="DataGridColumnFilterMethod" Value="@DataGridColumnFilterMethod.StartsWith">Starts With</SelectItem>
+                        <SelectItem TValue="DataGridColumnFilterMethod" Value="@DataGridColumnFilterMethod.EndsWith">Ends With</SelectItem>
+                    }
+                    <SelectItem TValue="DataGridColumnFilterMethod" Value="@DataGridColumnFilterMethod.Equals">Equals</SelectItem>
+                    <SelectItem TValue="DataGridColumnFilterMethod" Value="@DataGridColumnFilterMethod.NotEquals">Not Equals</SelectItem>
+                    @if ( isNumericOrDate )
+                    {
+                        <SelectItem TValue="DataGridColumnFilterMethod" Value="@DataGridColumnFilterMethod.GreaterThan">Greater Than</SelectItem>
+                        <SelectItem TValue="DataGridColumnFilterMethod" Value="@DataGridColumnFilterMethod.GreaterThanOrEqual">Greater Than Or Equal</SelectItem>
+                        <SelectItem TValue="DataGridColumnFilterMethod" Value="@DataGridColumnFilterMethod.LessThan">Less Than</SelectItem>
+                        <SelectItem TValue="DataGridColumnFilterMethod" Value="@DataGridColumnFilterMethod.LessThanOrEqual">Less Than Or Equal</SelectItem>
+                    }
                 </Select>
             </Column>
 
diff --git a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/DataGridApi.razor b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/DataGridApi.razor
index cd0a0decf6..fa038a8758 100644
--- a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/DataGridApi.razor
+++ b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/DataGridApi.razor
@@ -561,7 +561,7 @@
     
         Gets or sets whether user can see and edit column grouping.
     
-    
+    
         Sets the filter method to be used for filtering the column.
         If null, uses the DataGrid's FilterMethod.
     
diff --git a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Examples/DataGridColumnFilteringExample.razor b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Examples/DataGridColumnFilteringExample.razor
index 0f5b4c7ffa..b0bd1eb1d6 100644
--- a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Examples/DataGridColumnFilteringExample.razor
+++ b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Examples/DataGridColumnFilteringExample.razor
@@ -5,7 +5,7 @@
           Data="@employeeList"
           Responsive
           Filterable>
-    
+    
 
 
 @code{
diff --git a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Examples/DataGridFilterModeColumnFilteringExample.razor b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Examples/DataGridFilterModeColumnFilteringExample.razor
index 34f5454b6f..5535d335e5 100644
--- a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Examples/DataGridFilterModeColumnFilteringExample.razor
+++ b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Examples/DataGridFilterModeColumnFilteringExample.razor
@@ -6,7 +6,7 @@
           Responsive
           Filterable
           FilterMode="DataGridFilterMode.Menu">
-    
+     
     
     
 
diff --git a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Examples/DataGridFilterModeColumnTemplateFilteringExample.razor b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Examples/DataGridFilterModeColumnTemplateFilteringExample.razor
index 80d118eebc..55f5a009e0 100644
--- a/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Examples/DataGridFilterModeColumnTemplateFilteringExample.razor
+++ b/Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Examples/DataGridFilterModeColumnTemplateFilteringExample.razor
@@ -5,21 +5,35 @@
           Data="@employeeList"
           Responsive
           Filterable
-          FilterMode="DataGridFilterMode.Menu">
-    
-        
-        
-        
-    
-    
-        
-            
-                
+                    @{
+                        var isNumericOrDate = context.Column.ColumnType == DataGridColumnType.Numeric || context.Column.ColumnType == DataGridColumnType.Date;
+                    }
+
+                    @if ( !isNumericOrDate )
+                    {
+                        Contains
+                        Starts With
+                        Ends With
+                    }
+                    Equals
+                    Not Equals
+                    @if ( isNumericOrDate )
+                    {
+                        Greater Than
+                        Greater Than Or Equal
+                        Less Than
+                        Less Than Or Equal
+                    }
                 
             
 
diff --git a/Documentation/Blazorise.Docs/Pages/News/2023-11-30-release-notes-140.razor b/Documentation/Blazorise.Docs/Pages/News/2023-11-30-release-notes-140.razor
index 272f2b9151..44cd07f866 100644
--- a/Documentation/Blazorise.Docs/Pages/News/2023-11-30-release-notes-140.razor
+++ b/Documentation/Blazorise.Docs/Pages/News/2023-11-30-release-notes-140.razor
@@ -69,6 +69,29 @@
     Official .NET 8 Support
 
 
+
+    DataGrid
+
+
+
+    With the introduction of the new DataGridFilterMode.Menu feature, we've found out that although it was an appreciated feature, users wanted even more contextual filtering support, i.e: numeric columns, with inbuilt 'less than'' or 'greater than' filtering method support.
+
+
+
+    We've now changed the DataGridColumn FilterMethod to be a specialized and contextual enum named DataGridColumnFilterMethod that enables additional filtering capabilities for numeric and date columns.
+
+
+
+    LessThan
+    LessThanOrEqual
+    GreaterThan
+    GreaterThanOrEqual
+
+
+
+    If you're using the DataGridFilterMode.Menu feature, your date and numeric columns will now present the new filtering capabilities.
+    Otherwise, you may also set the new filtering capabilities on your regular columns, but please take note that these will only work if the columns are of a numeric or date type.
+
 
 
     Tabs
diff --git a/Source/Extensions/Blazorise.DataGrid/Contexts/FilterColumnContext.cs b/Source/Extensions/Blazorise.DataGrid/Contexts/FilterColumnContext.cs
index ca28c02a84..5501f6c598 100644
--- a/Source/Extensions/Blazorise.DataGrid/Contexts/FilterColumnContext.cs
+++ b/Source/Extensions/Blazorise.DataGrid/Contexts/FilterColumnContext.cs
@@ -13,7 +13,7 @@ public class FilterColumnContext
     /// 
     /// Constructor for context.
     /// 
-    public FilterColumnContext( DataGridColumn column, Func getFilterMethod, Func getSearchValue, EventCallback filterChanged, EventCallback filterMethodChanged, EventCallback filter, EventCallback clearFilter )
+    public FilterColumnContext( DataGridColumn column, Func getFilterMethod, Func getSearchValue, EventCallback filterChanged, EventCallback filterMethodChanged, EventCallback filter, EventCallback clearFilter )
     {
         Column = column;
         GetFilterMethod = getFilterMethod;
@@ -36,7 +36,7 @@ public FilterColumnContext( DataGridColumn column, Func
     /// Gets the filter method that is being used.
     /// 
-    public Func GetFilterMethod { get; set; }
+    public Func GetFilterMethod { get; set; }
 
     /// 
     /// Gets the current search value
@@ -51,7 +51,7 @@ public FilterColumnContext( DataGridColumn column, Func
     /// Triggers filter method changed event.
     /// 
-    public EventCallback FilterMethodChanged { get; set; }
+    public EventCallback FilterMethodChanged { get; set; }
 
     /// 
     /// Triggers filter event for this column.
diff --git a/Source/Extensions/Blazorise.DataGrid/DataGrid.razor.cs b/Source/Extensions/Blazorise.DataGrid/DataGrid.razor.cs
index a199bd472c..5d59098247 100644
--- a/Source/Extensions/Blazorise.DataGrid/DataGrid.razor.cs
+++ b/Source/Extensions/Blazorise.DataGrid/DataGrid.razor.cs
@@ -1751,7 +1751,7 @@ where column.CustomFilter( cellRealValue, column.Filter.SearchValue )
                     query = from item in query
                             let cellRealValue = column.GetValue( item )
                             let cellStringValue = cellRealValue == null ? string.Empty : cellRealValue.ToString()
-                            where CompareFilterValues( cellStringValue, stringSearchValue, column.GetFilterMethod() )
+                            where CompareFilterValues( cellStringValue, stringSearchValue, column.GetFilterMethod(), column.ColumnType, column.GetValueType() )
                             select item;
                 }
             }
@@ -1775,23 +1775,249 @@ protected internal Task OnFilterChanged( DataGridColumn column, object va
         return Reload( filterCancellationTokenSource.Token );
     }
 
-    private bool CompareFilterValues( string searchValue, string compareTo, DataGridFilterMethod? columnFilterMethod )
+    private bool CompareFilterValues( string searchValue, string compareTo, DataGridColumnFilterMethod? columnFilterMethod, DataGridColumnType columnType, Type columnValueType )
     {
-        var filterMethod = columnFilterMethod ?? FilterMethod;
-        switch ( filterMethod )
+        if ( columnFilterMethod is not null )
         {
-            case DataGridFilterMethod.StartsWith:
-                return searchValue.StartsWith( compareTo, StringComparison.OrdinalIgnoreCase );
-            case DataGridFilterMethod.EndsWith:
-                return searchValue.EndsWith( compareTo, StringComparison.OrdinalIgnoreCase );
-            case DataGridFilterMethod.Equals:
-                return searchValue.Equals( compareTo, StringComparison.OrdinalIgnoreCase );
-            case DataGridFilterMethod.NotEquals:
-                return !searchValue.Equals( compareTo, StringComparison.OrdinalIgnoreCase );
-            case DataGridFilterMethod.Contains:
-            default:
-                return searchValue.IndexOf( compareTo, StringComparison.OrdinalIgnoreCase ) >= 0;
+            switch ( columnFilterMethod )
+            {
+                case DataGridColumnFilterMethod.StartsWith:
+                    return searchValue.StartsWith( compareTo, StringComparison.OrdinalIgnoreCase );
+                case DataGridColumnFilterMethod.EndsWith:
+                    return searchValue.EndsWith( compareTo, StringComparison.OrdinalIgnoreCase );
+                case DataGridColumnFilterMethod.Equals:
+                    if ( columnType == DataGridColumnType.Numeric )
+                    {
+                        if ( columnValueType == typeof( decimal ) || columnValueType == typeof( decimal? ) )
+                            return decimal.TryParse( compareTo, out var compareToDecimal ) && decimal.TryParse( searchValue, out var searchValueDecimal ) && searchValueDecimal == compareToDecimal;
+
+                        if ( columnValueType == typeof( double ) || columnValueType == typeof( double? ) )
+                            return double.TryParse( compareTo, out var compareToDouble ) && double.TryParse( searchValue, out var searchValueDouble ) && searchValueDouble == compareToDouble;
+
+                        if ( columnValueType == typeof( float ) || columnValueType == typeof( float? ) )
+                            return float.TryParse( compareTo, out var compareToFloat ) && float.TryParse( searchValue, out var searchValueFloat ) && searchValueFloat == compareToFloat;
+
+                        if ( columnValueType == typeof( int ) || columnValueType == typeof( int? ) )
+                            return int.TryParse( compareTo, out var compareToInt ) && int.TryParse( searchValue, out var searchValueInt ) && searchValueInt == compareToInt;
+
+                        if ( columnValueType == typeof( short ) || columnValueType == typeof( short? ) )
+                            return short.TryParse( compareTo, out var compareToShort ) && short.TryParse( searchValue, out var searchValueShort ) && searchValueShort == compareToShort;
+                    }
+                    else if ( columnType == DataGridColumnType.Date )
+                    {
+                        if ( columnValueType == typeof( DateTime ) || columnValueType == typeof( DateTime? ) )
+                            return DateTime.TryParse( compareTo, out var compareToDateTime ) && DateTime.TryParse( searchValue, out var searchValueDateTime ) && searchValueDateTime == compareToDateTime;
+
+                        if ( columnValueType == typeof( DateTimeOffset ) || columnValueType == typeof( DateTimeOffset? ) )
+                            return DateTimeOffset.TryParse( compareTo, out var compareToDateTimeOffset ) && DateTimeOffset.TryParse( searchValue, out var searchValueDateTimeOffset ) && searchValueDateTimeOffset == compareToDateTimeOffset;
+
+                        if ( columnValueType == typeof( DateOnly ) || columnValueType == typeof( DateOnly? ) )
+                            return DateOnly.TryParse( compareTo, out var compareToDateOnly ) && DateOnly.TryParse( searchValue, out var SearchValueDateOnly ) && SearchValueDateOnly == compareToDateOnly;
+
+                        if ( columnValueType == typeof( TimeOnly ) || columnValueType == typeof( TimeOnly? ) )
+                            return TimeOnly.TryParse( compareTo, out var compareToTimeOnly ) && TimeOnly.TryParse( searchValue, out var searchValueTimeOnly ) && searchValueTimeOnly == compareToTimeOnly;
+
+                        if ( columnValueType == typeof( TimeSpan ) || columnValueType == typeof( TimeSpan? ) )
+                            return TimeSpan.TryParse( compareTo, out var compareToTimeSpan ) && TimeSpan.TryParse( searchValue, out var searchValueTimeSpan ) && searchValueTimeSpan == compareToTimeSpan;
+                    }
+
+                    return searchValue.Equals( compareTo, StringComparison.OrdinalIgnoreCase );
+                case DataGridColumnFilterMethod.NotEquals:
+                    if ( columnType == DataGridColumnType.Numeric )
+                    {
+                        if ( columnValueType == typeof( decimal ) || columnValueType == typeof( decimal? ) )
+                            return decimal.TryParse( compareTo, out var compareToDecimal ) && decimal.TryParse( searchValue, out var searchValueDecimal ) && searchValueDecimal != compareToDecimal;
+
+                        if ( columnValueType == typeof( double ) || columnValueType == typeof( double? ) )
+                            return double.TryParse( compareTo, out var compareToDouble ) && double.TryParse( searchValue, out var searchValueDouble ) && searchValueDouble != compareToDouble;
+
+                        if ( columnValueType == typeof( float ) || columnValueType == typeof( float? ) )
+                            return float.TryParse( compareTo, out var compareToFloat ) && float.TryParse( searchValue, out var searchValueFloat ) && searchValueFloat != compareToFloat;
+
+                        if ( columnValueType == typeof( int ) || columnValueType == typeof( int? ) )
+                            return int.TryParse( compareTo, out var compareToInt ) && int.TryParse( searchValue, out var searchValueInt ) && searchValueInt != compareToInt;
+
+                        if ( columnValueType == typeof( short ) || columnValueType == typeof( short? ) )
+                            return short.TryParse( compareTo, out var compareToShort ) && short.TryParse( searchValue, out var searchValueShort ) && searchValueShort != compareToShort;
+                    }
+                    else if ( columnType == DataGridColumnType.Date )
+                    {
+                        if ( columnValueType == typeof( DateTime ) || columnValueType == typeof( DateTime? ) )
+                            return DateTime.TryParse( compareTo, out var compareToDateTime ) && DateTime.TryParse( searchValue, out var searchValueDateTime ) && searchValueDateTime != compareToDateTime;
+
+                        if ( columnValueType == typeof( DateTimeOffset ) || columnValueType == typeof( DateTimeOffset? ) )
+                            return DateTimeOffset.TryParse( compareTo, out var compareToDateTimeOffset ) && DateTimeOffset.TryParse( searchValue, out var searchValueDateTimeOffset ) && searchValueDateTimeOffset != compareToDateTimeOffset;
+
+                        if ( columnValueType == typeof( DateOnly ) || columnValueType == typeof( DateOnly? ) )
+                            return DateOnly.TryParse( compareTo, out var compareToDateOnly ) && DateOnly.TryParse( searchValue, out var SearchValueDateOnly ) && SearchValueDateOnly != compareToDateOnly;
+
+                        if ( columnValueType == typeof( TimeOnly ) || columnValueType == typeof( TimeOnly? ) )
+                            return TimeOnly.TryParse( compareTo, out var compareToTimeOnly ) && TimeOnly.TryParse( searchValue, out var searchValueTimeOnly ) && searchValueTimeOnly != compareToTimeOnly;
+
+                        if ( columnValueType == typeof( TimeSpan ) || columnValueType == typeof( TimeSpan? ) )
+                            return TimeSpan.TryParse( compareTo, out var compareToTimeSpan ) && TimeSpan.TryParse( searchValue, out var searchValueTimeSpan ) && searchValueTimeSpan != compareToTimeSpan;
+                    }
+                    return !searchValue.Equals( compareTo, StringComparison.OrdinalIgnoreCase );
+
+                case DataGridColumnFilterMethod.LessThan:
+                    if ( columnType == DataGridColumnType.Numeric )
+                    {
+                        if ( columnValueType == typeof( decimal ) || columnValueType == typeof( decimal? ) )
+                            return decimal.TryParse( compareTo, out var compareToDecimal ) && decimal.TryParse( searchValue, out var searchValueDecimal ) && searchValueDecimal < compareToDecimal;
+
+                        if ( columnValueType == typeof( double ) || columnValueType == typeof( double? ) )
+                            return double.TryParse( compareTo, out var compareToDouble ) && double.TryParse( searchValue, out var searchValueDouble ) && searchValueDouble < compareToDouble;
+
+                        if ( columnValueType == typeof( float ) || columnValueType == typeof( float? ) )
+                            return float.TryParse( compareTo, out var compareToFloat ) && float.TryParse( searchValue, out var searchValueFloat ) && searchValueFloat < compareToFloat;
+
+                        if ( columnValueType == typeof( int ) || columnValueType == typeof( int? ) )
+                            return int.TryParse( compareTo, out var compareToInt ) && int.TryParse( searchValue, out var searchValueInt ) && searchValueInt < compareToInt;
+
+                        if ( columnValueType == typeof( short ) || columnValueType == typeof( short? ) )
+                            return short.TryParse( compareTo, out var compareToShort ) && short.TryParse( searchValue, out var searchValueShort ) && searchValueShort < compareToShort;
+                    }
+                    else if ( columnType == DataGridColumnType.Date )
+                    {
+                        if ( columnValueType == typeof( DateTime ) || columnValueType == typeof( DateTime? ) )
+                            return DateTime.TryParse( compareTo, out var compareToDateTime ) && DateTime.TryParse( searchValue, out var searchValueDateTime ) && searchValueDateTime < compareToDateTime;
+
+                        if ( columnValueType == typeof( DateTimeOffset ) || columnValueType == typeof( DateTimeOffset? ) )
+                            return DateTimeOffset.TryParse( compareTo, out var compareToDateTimeOffset ) && DateTimeOffset.TryParse( searchValue, out var searchValueDateTimeOffset ) && searchValueDateTimeOffset < compareToDateTimeOffset;
+
+                        if ( columnValueType == typeof( DateOnly ) || columnValueType == typeof( DateOnly? ) )
+                            return DateOnly.TryParse( compareTo, out var compareToDateOnly ) && DateOnly.TryParse( searchValue, out var SearchValueDateOnly ) && SearchValueDateOnly < compareToDateOnly;
+
+                        if ( columnValueType == typeof( TimeOnly ) || columnValueType == typeof( TimeOnly? ) )
+                            return TimeOnly.TryParse( compareTo, out var compareToTimeOnly ) && TimeOnly.TryParse( searchValue, out var searchValueTimeOnly ) && searchValueTimeOnly < compareToTimeOnly;
+
+                        if ( columnValueType == typeof( TimeSpan ) || columnValueType == typeof( TimeSpan? ) )
+                            return TimeSpan.TryParse( compareTo, out var compareToTimeSpan ) && TimeSpan.TryParse( searchValue, out var searchValueTimeSpan ) && searchValueTimeSpan < compareToTimeSpan;
+                    }
+                    return false;
+                case DataGridColumnFilterMethod.LessThanOrEqual:
+                    if ( columnType == DataGridColumnType.Numeric )
+                    {
+                        if ( columnValueType == typeof( decimal ) || columnValueType == typeof( decimal? ) )
+                            return decimal.TryParse( compareTo, out var compareToDecimal ) && decimal.TryParse( searchValue, out var searchValueDecimal ) && searchValueDecimal <= compareToDecimal;
+
+                        if ( columnValueType == typeof( double ) || columnValueType == typeof( double? ) )
+                            return double.TryParse( compareTo, out var compareToDouble ) && double.TryParse( searchValue, out var searchValueDouble ) && searchValueDouble <= compareToDouble;
+
+                        if ( columnValueType == typeof( float ) || columnValueType == typeof( float? ) )
+                            return float.TryParse( compareTo, out var compareToFloat ) && float.TryParse( searchValue, out var searchValueFloat ) && searchValueFloat <= compareToFloat;
+
+                        if ( columnValueType == typeof( int ) || columnValueType == typeof( int? ) )
+                            return int.TryParse( compareTo, out var compareToInt ) && int.TryParse( searchValue, out var searchValueInt ) && searchValueInt <= compareToInt;
+
+                        if ( columnValueType == typeof( short ) || columnValueType == typeof( short? ) )
+                            return short.TryParse( compareTo, out var compareToShort ) && short.TryParse( searchValue, out var searchValueShort ) && searchValueShort <= compareToShort;
+                    }
+                    else if ( columnType == DataGridColumnType.Date )
+                    {
+                        if ( columnValueType == typeof( DateTime ) || columnValueType == typeof( DateTime? ) )
+                            return DateTime.TryParse( compareTo, out var compareToDateTime ) && DateTime.TryParse( searchValue, out var searchValueDateTime ) && searchValueDateTime <= compareToDateTime;
+
+                        if ( columnValueType == typeof( DateTimeOffset ) || columnValueType == typeof( DateTimeOffset? ) )
+                            return DateTimeOffset.TryParse( compareTo, out var compareToDateTimeOffset ) && DateTimeOffset.TryParse( searchValue, out var searchValueDateTimeOffset ) && searchValueDateTimeOffset <= compareToDateTimeOffset;
+
+                        if ( columnValueType == typeof( DateOnly ) || columnValueType == typeof( DateOnly? ) )
+                            return DateOnly.TryParse( compareTo, out var compareToDateOnly ) && DateOnly.TryParse( searchValue, out var SearchValueDateOnly ) && SearchValueDateOnly <= compareToDateOnly;
+
+                        if ( columnValueType == typeof( TimeOnly ) || columnValueType == typeof( TimeOnly? ) )
+                            return TimeOnly.TryParse( compareTo, out var compareToTimeOnly ) && TimeOnly.TryParse( searchValue, out var searchValueTimeOnly ) && searchValueTimeOnly <= compareToTimeOnly;
+
+                        if ( columnValueType == typeof( TimeSpan ) || columnValueType == typeof( TimeSpan? ) )
+                            return TimeSpan.TryParse( compareTo, out var compareToTimeSpan ) && TimeSpan.TryParse( searchValue, out var searchValueTimeSpan ) && searchValueTimeSpan <= compareToTimeSpan;
+                    }
+                    return false;
+                case DataGridColumnFilterMethod.GreaterThan:
+                    if ( columnType == DataGridColumnType.Numeric )
+                    {
+                        if ( columnValueType == typeof( decimal ) || columnValueType == typeof( decimal? ) )
+                            return decimal.TryParse( compareTo, out var compareToDecimal ) && decimal.TryParse( searchValue, out var searchValueDecimal ) && searchValueDecimal > compareToDecimal;
+
+                        if ( columnValueType == typeof( double ) || columnValueType == typeof( double? ) )
+                            return double.TryParse( compareTo, out var compareToDouble ) && double.TryParse( searchValue, out var searchValueDouble ) && searchValueDouble > compareToDouble;
+
+                        if ( columnValueType == typeof( float ) || columnValueType == typeof( float? ) )
+                            return float.TryParse( compareTo, out var compareToFloat ) && float.TryParse( searchValue, out var searchValueFloat ) && searchValueFloat > compareToFloat;
+
+                        if ( columnValueType == typeof( int ) || columnValueType == typeof( int? ) )
+                            return int.TryParse( compareTo, out var compareToInt ) && int.TryParse( searchValue, out var searchValueInt ) && searchValueInt > compareToInt;
+
+                        if ( columnValueType == typeof( short ) || columnValueType == typeof( short? ) )
+                            return short.TryParse( compareTo, out var compareToShort ) && short.TryParse( searchValue, out var searchValueShort ) && searchValueShort > compareToShort;
+                    }
+                    else if ( columnType == DataGridColumnType.Date )
+                    {
+                        if ( columnValueType == typeof( DateTime ) || columnValueType == typeof( DateTime? ) )
+                            return DateTime.TryParse( compareTo, out var compareToDateTime ) && DateTime.TryParse( searchValue, out var searchValueDateTime ) && searchValueDateTime > compareToDateTime;
+
+                        if ( columnValueType == typeof( DateTimeOffset ) || columnValueType == typeof( DateTimeOffset? ) )
+                            return DateTimeOffset.TryParse( compareTo, out var compareToDateTimeOffset ) && DateTimeOffset.TryParse( searchValue, out var searchValueDateTimeOffset ) && searchValueDateTimeOffset > compareToDateTimeOffset;
+
+                        if ( columnValueType == typeof( DateOnly ) || columnValueType == typeof( DateOnly? ) )
+                            return DateOnly.TryParse( compareTo, out var compareToDateOnly ) && DateOnly.TryParse( searchValue, out var SearchValueDateOnly ) && SearchValueDateOnly > compareToDateOnly;
+
+                        if ( columnValueType == typeof( TimeOnly ) || columnValueType == typeof( TimeOnly? ) )
+                            return TimeOnly.TryParse( compareTo, out var compareToTimeOnly ) && TimeOnly.TryParse( searchValue, out var searchValueTimeOnly ) && searchValueTimeOnly > compareToTimeOnly;
+
+                        if ( columnValueType == typeof( TimeSpan ) || columnValueType == typeof( TimeSpan? ) )
+                            return TimeSpan.TryParse( compareTo, out var compareToTimeSpan ) && TimeSpan.TryParse( searchValue, out var searchValueTimeSpan ) && searchValueTimeSpan > compareToTimeSpan;
+                    }
+                    return false;
+                case DataGridColumnFilterMethod.GreaterThanOrEqual:
+                    if ( columnType == DataGridColumnType.Numeric )
+                    {
+                        if ( columnValueType == typeof( decimal ) || columnValueType == typeof( decimal? ) )
+                            return decimal.TryParse( compareTo, out var compareToDecimal ) && decimal.TryParse( searchValue, out var searchValueDecimal ) && searchValueDecimal >= compareToDecimal;
+
+                        if ( columnValueType == typeof( double ) || columnValueType == typeof( double? ) )
+                            return double.TryParse( compareTo, out var compareToDouble ) && double.TryParse( searchValue, out var searchValueDouble ) && searchValueDouble >= compareToDouble;
+
+                        if ( columnValueType == typeof( float ) || columnValueType == typeof( float? ) )
+                            return float.TryParse( compareTo, out var compareToFloat ) && float.TryParse( searchValue, out var searchValueFloat ) && searchValueFloat >= compareToFloat;
+
+                        if ( columnValueType == typeof( int ) || columnValueType == typeof( int? ) )
+                            return int.TryParse( compareTo, out var compareToInt ) && int.TryParse( searchValue, out var searchValueInt ) && searchValueInt >= compareToInt;
+
+                        if ( columnValueType == typeof( short ) || columnValueType == typeof( short? ) )
+                            return short.TryParse( compareTo, out var compareToShort ) && short.TryParse( searchValue, out var searchValueShort ) && searchValueShort >= compareToShort;
+                    }
+                    else if ( columnType == DataGridColumnType.Date )
+                    {
+                        if ( columnValueType == typeof( DateTime ) || columnValueType == typeof( DateTime? ) )
+                            return DateTime.TryParse( compareTo, out var compareToDateTime ) && DateTime.TryParse( searchValue, out var searchValueDateTime ) && searchValueDateTime >= compareToDateTime;
+
+                        if ( columnValueType == typeof( DateTimeOffset ) || columnValueType == typeof( DateTimeOffset? ) )
+                            return DateTimeOffset.TryParse( compareTo, out var compareToDateTimeOffset ) && DateTimeOffset.TryParse( searchValue, out var searchValueDateTimeOffset ) && searchValueDateTimeOffset >= compareToDateTimeOffset;
+
+                        if ( columnValueType == typeof( DateOnly ) || columnValueType == typeof( DateOnly? ) )
+                            return DateOnly.TryParse( compareTo, out var compareToDateOnly ) && DateOnly.TryParse( searchValue, out var SearchValueDateOnly ) && SearchValueDateOnly >= compareToDateOnly;
+
+                        if ( columnValueType == typeof( TimeOnly ) || columnValueType == typeof( TimeOnly? ) )
+                            return TimeOnly.TryParse( compareTo, out var compareToTimeOnly ) && TimeOnly.TryParse( searchValue, out var searchValueTimeOnly ) && searchValueTimeOnly >= compareToTimeOnly;
+
+                        if ( columnValueType == typeof( TimeSpan ) || columnValueType == typeof( TimeSpan? ) )
+                            return TimeSpan.TryParse( compareTo, out var compareToTimeSpan ) && TimeSpan.TryParse( searchValue, out var searchValueTimeSpan ) && searchValueTimeSpan >= compareToTimeSpan;
+                    }
+                    return false;
+                case DataGridColumnFilterMethod.Contains:
+                default:
+                    return searchValue.Contains( compareTo, StringComparison.OrdinalIgnoreCase );
+            }
+
         }
+
+        return FilterMethod switch
+        {
+            DataGridFilterMethod.StartsWith => searchValue.StartsWith( compareTo, StringComparison.OrdinalIgnoreCase ),
+            DataGridFilterMethod.EndsWith => searchValue.EndsWith( compareTo, StringComparison.OrdinalIgnoreCase ),
+            DataGridFilterMethod.Equals => searchValue.Equals( compareTo, StringComparison.OrdinalIgnoreCase ),
+            DataGridFilterMethod.NotEquals => !searchValue.Equals( compareTo, StringComparison.OrdinalIgnoreCase ),
+            _ => searchValue.Contains( compareTo, StringComparison.OrdinalIgnoreCase ),
+        };
     }
 
     private IEnumerable FilterViewData()
diff --git a/Source/Extensions/Blazorise.DataGrid/DataGridColumn.cs b/Source/Extensions/Blazorise.DataGrid/DataGridColumn.cs
index 6242cb7364..3196fe1bdd 100644
--- a/Source/Extensions/Blazorise.DataGrid/DataGridColumn.cs
+++ b/Source/Extensions/Blazorise.DataGrid/DataGridColumn.cs
@@ -25,7 +25,7 @@ public partial class DataGridColumn : BaseDataGridColumn
     /// 
     /// FilterMethod can come from programatically defined Parameter or explicitly by the user through the interface.
     /// 
-    private DataGridFilterMethod? currentFilterMethod;
+    private DataGridColumnFilterMethod? currentFilterMethod;
 
     #endregion
 
@@ -252,16 +252,26 @@ internal Task SetSortOrder( int sortOrder )
         return SortOrderChanged.InvokeAsync( sortOrder );
     }
 
-    internal void SetFilterMethod( DataGridFilterMethod? filterMethod )
+    internal void SetFilterMethod( DataGridColumnFilterMethod? filterMethod )
     {
         currentFilterMethod = filterMethod;
     }
 
-    internal DataGridFilterMethod? GetFilterMethod()
+    internal DataGridColumnFilterMethod? GetFilterMethod()
     {
         return currentFilterMethod;
     }
 
+    internal DataGridColumnFilterMethod GetDataGridFilterMethodAsColumn()
+    {
+        return ParentDataGrid.FilterMethod == DataGridFilterMethod.Contains ? DataGridColumnFilterMethod.Contains
+            : ParentDataGrid.FilterMethod == DataGridFilterMethod.StartsWith ? DataGridColumnFilterMethod.StartsWith
+            : ParentDataGrid.FilterMethod == DataGridFilterMethod.EndsWith ? DataGridColumnFilterMethod.EndsWith
+            : ParentDataGrid.FilterMethod == DataGridFilterMethod.Equals ? DataGridColumnFilterMethod.Equals
+            : ParentDataGrid.FilterMethod == DataGridFilterMethod.NotEquals ? DataGridColumnFilterMethod.NotEquals
+            : DataGridColumnFilterMethod.Contains;
+    }
+
     #endregion
 
     #region Properties
@@ -759,7 +769,7 @@ public SortDirection CurrentSortDirection
     /// Sets the filter method to be used for filtering the column.
     /// If null, uses the  
     /// 
-    [Parameter] public DataGridFilterMethod? FilterMethod { get; set; }
+    [Parameter] public DataGridColumnFilterMethod? FilterMethod { get; set; }
 
     /// 
     /// Defines the caption to be displayed for a group header.
diff --git a/Source/Extensions/Blazorise.DataGrid/Enums/DataGridColumnFilterMethod.cs b/Source/Extensions/Blazorise.DataGrid/Enums/DataGridColumnFilterMethod.cs
new file mode 100644
index 0000000000..3cbec341f1
--- /dev/null
+++ b/Source/Extensions/Blazorise.DataGrid/Enums/DataGridColumnFilterMethod.cs
@@ -0,0 +1,17 @@
+namespace Blazorise.DataGrid;
+
+/// 
+/// Defines the type of column filter operations.
+/// 
+public enum DataGridColumnFilterMethod
+{
+    Contains,
+    StartsWith,
+    EndsWith,
+    Equals,
+    NotEquals,
+    LessThan,
+    LessThanOrEqual,
+    GreaterThan,
+    GreaterThanOrEqual,
+}
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Enums/DataGridFilterMethod.cs b/Source/Extensions/Blazorise.DataGrid/Enums/DataGridFilterMethod.cs
index b32106954f..d5dc054513 100644
--- a/Source/Extensions/Blazorise.DataGrid/Enums/DataGridFilterMethod.cs
+++ b/Source/Extensions/Blazorise.DataGrid/Enums/DataGridFilterMethod.cs
@@ -10,4 +10,4 @@ public enum DataGridFilterMethod
     EndsWith,
     Equals,
     NotEquals,
-}
\ No newline at end of file
+}
diff --git a/Source/Extensions/Blazorise.DataGrid/Models/DataGridColumnInfo.cs b/Source/Extensions/Blazorise.DataGrid/Models/DataGridColumnInfo.cs
index 0c450aa2b0..2412553a4f 100644
--- a/Source/Extensions/Blazorise.DataGrid/Models/DataGridColumnInfo.cs
+++ b/Source/Extensions/Blazorise.DataGrid/Models/DataGridColumnInfo.cs
@@ -19,7 +19,7 @@ public class DataGridColumnInfo
     /// Current column type.
     /// Sort field name.
     /// Filter method.
-    public DataGridColumnInfo( string field, object searchValue, SortDirection sortDirection, int sortIndex, DataGridColumnType columnType, string sortField, DataGridFilterMethod? filterMethod )
+    public DataGridColumnInfo( string field, object searchValue, SortDirection sortDirection, int sortIndex, DataGridColumnType columnType, string sortField, DataGridColumnFilterMethod? filterMethod )
     {
         Field = field;
         SearchValue = searchValue;
@@ -63,5 +63,5 @@ public DataGridColumnInfo( string field, object searchValue, SortDirection sortD
     /// 
     /// Gets the column filter method.
     /// 
-    public DataGridFilterMethod? FilterMethod { get; }
+    public DataGridColumnFilterMethod? FilterMethod { get; }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/cs.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/cs.json
index 2ae344a7b8..8dd4a8a9f6 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/cs.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/cs.json
@@ -22,6 +22,10 @@
     "Starts With": "Začíná s",
     "Ends With": "Končí s",
     "Equals": "Rovná se",
-    "Not Equals": "Nerovná se"
+    "Not Equals": "Nerovná se",
+    "Greater Than": "Větší než",
+    "Greater Than or Equal": "Větší než nebo rovno",
+    "Less Than": "Méně než",
+    "Less Than or Equal": "Menší než nebo rovno"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/da.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/da.json
index b324b569d7..517633ac22 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/da.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/da.json
@@ -22,6 +22,10 @@
     "Starts With": "Starter med",
     "Ends With": "Ender med",
     "Equals": "Lige med",
-    "Not Equals": "Ikke Lige"
+    "Not Equals": "Ikke Lige",
+    "Greater Than": "Bedre end",
+    "Greater Than or Equal": "Større end eller lige",
+    "Less Than": "Mindre end",
+    "Less Than or Equal": "Mindre end eller lige"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/de.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/de.json
index 0a04897aff..d8c665b925 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/de.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/de.json
@@ -22,6 +22,10 @@
     "Starts With": "Beginnt mit",
     "Ends With": "Endet mit",
     "Equals": "Gleich",
-    "Not Equals": "Nicht gleich"
+    "Not Equals": "Nicht gleich",
+    "Greater Than": "Größer als",
+    "Greater Than or Equal": "Größer als oder gleich",
+    "Less Than": "Weniger als",
+    "Less Than or Equal": "Weniger als oder gleich"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/en.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/en.json
index 1bd957eb84..6d3b9522a1 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/en.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/en.json
@@ -22,6 +22,10 @@
     "Starts With": "Starts With",
     "Ends With": "Ends With",
     "Equals": "Equals",
-    "Not Equals": "Not Equals"
+    "Not Equals": "Not Equals",
+    "Greater Than": "Greater Than",
+    "Greater Than or Equal": "Greater Than or Equal",
+    "Less Than": "Less Than",
+    "Less Than or Equal": "Less Than or Equal"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/es.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/es.json
index 6d19cfe3e3..5122b54322 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/es.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/es.json
@@ -22,6 +22,10 @@
     "Starts With": "Comienza con",
     "Ends With": "Termina con",
     "Equals": "Igual",
-    "Not Equals": "No es igual"
+    "Not Equals": "No es igual",
+    "Greater Than": "Mas grande que",
+    "Greater Than or Equal": "Mayor que o igual",
+    "Less Than": "Menos que",
+    "Less Than or Equal": "Menor o igual"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/fr.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/fr.json
index 5be672092b..1fafc32324 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/fr.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/fr.json
@@ -22,6 +22,10 @@
     "Starts With": "Commence avec",
     "Ends With": "Se termine par",
     "Equals": "Équivaut à",
-    "Not Equals": "Pas égal"
+    "Not Equals": "Pas égal",
+    "Greater Than": "Plus grand que",
+    "Greater Than or Equal": "Meilleur que ou égal",
+    "Less Than": "Moins que",
+    "Less Than or Equal": "Inférieur ou égal"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/hr.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/hr.json
index 8324f2a41c..192f3c6f58 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/hr.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/hr.json
@@ -22,6 +22,10 @@
     "Starts With": "Počinje sa",
     "Ends With": "Završava sa",
     "Equals": "Jednako",
-    "Not Equals": "Nije jednako"
+    "Not Equals": "Nije jednako",
+    "Greater Than": "Veći od",
+    "Greater Than or Equal": "Veće od ili jednako",
+    "Less Than": "Manje od",
+    "Less Than or Equal": "Manje od ili jednako"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/is.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/is.json
index d781f3a577..63ca22714a 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/is.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/is.json
@@ -22,6 +22,10 @@
     "Starts With": "Byrjar með",
     "Ends With": "Endar Með",
     "Equals": "Jafnt",
-    "Not Equals": "Ekki jafnir"
+    "Not Equals": "Ekki jafnir",
+    "Greater Than": "Meiri en",
+    "Greater Than or Equal": "Stærri en eða jafn",
+    "Less Than": "Minna en",
+    "Less Than or Equal": "Minna en eða jafnt"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/it.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/it.json
index 03871baa0b..0a776e6620 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/it.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/it.json
@@ -22,6 +22,10 @@
     "Starts With": "Inizia con",
     "Ends With": "Finisce con",
     "Equals": "Equivale",
-    "Not Equals": "Non uguale"
+    "Not Equals": "Non uguale",
+    "Greater Than": "Più grande di",
+    "Greater Than or Equal": "Maggiore o uguale",
+    "Less Than": "Meno di",
+    "Less Than or Equal": "Minore o uguale"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/nl.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/nl.json
index 9fdbc4bbbf..403174c1e9 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/nl.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/nl.json
@@ -22,6 +22,10 @@
     "Starts With": "Begint met",
     "Ends With": "Eindigt met",
     "Equals": "Gelijk aan",
-    "Not Equals": "Niet gelijk"
+    "Not Equals": "Niet gelijk",
+    "Greater Than": "Groter dan",
+    "Greater Than or Equal": "Groter dan of gelijk aan",
+    "Less Than": "Minder dan",
+    "Less Than or Equal": "Minder dan of gelijk"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/pl.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/pl.json
index 32bf81da3b..003a28a5e6 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/pl.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/pl.json
@@ -22,6 +22,10 @@
     "Starts With": "Zaczynać z",
     "Ends With": "Kończy się na",
     "Equals": "EqualsRówna się",
-    "Not Equals": "Nie równe"
+    "Not Equals": "Nie równe",
+    "Greater Than": "Lepszy niż",
+    "Greater Than or Equal": "Większe lub równe",
+    "Less Than": "Mniej niż",
+    "Less Than or Equal": "Mniej niż lub równo"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/pt.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/pt.json
index 72c67acb6e..256b6ff339 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/pt.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/pt.json
@@ -22,6 +22,10 @@
     "Starts With": "Começa com",
     "Ends With": "Acaba com",
     "Equals": "Igual",
-    "Not Equals": "Não é igual"
+    "Not Equals": "Não é igual",
+    "Greater Than": "Maior que",
+    "Greater Than or Equal": "Maior que ou igual",
+    "Less Than": "Menor que",
+    "Less Than or Equal": "Menor que ou igual"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/ru.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/ru.json
index 6dc4eb2cc1..01185594ee 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/ru.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/ru.json
@@ -22,6 +22,10 @@
     "Starts With": "Начинается с",
     "Ends With": "Заканчивается с",
     "Equals": "Равно",
-    "Not Equals": "Не равно"
+    "Not Equals": "Не равно",
+    "Greater Than": "Больше чем",
+    "Greater Than or Equal": "Больше или равно",
+    "Less Than": "Меньше, чем",
+    "Less Than or Equal": "Меньше или равно"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/sk.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/sk.json
index 953dfe8974..b6ba6e699f 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/sk.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/sk.json
@@ -22,6 +22,10 @@
     "Starts With": "Začína s",
     "Ends With": "Končí s",
     "Equals": "Rovná sa",
-    "Not Equals": "Nie Rovná sa"
+    "Not Equals": "Nie Rovná sa",
+    "Greater Than": "Väčší než",
+    "Greater Than or Equal": "Väčšie než alebo rovné",
+    "Less Than": "Menej ako",
+    "Less Than or Equal": "Menej než alebo rovné"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/tr.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/tr.json
index bd755c7369..9e3eb67257 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/tr.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/tr.json
@@ -22,6 +22,10 @@
     "Starts With": "İle başlar",
     "Ends With": "ile biter",
     "Equals": "eşittir",
-    "Not Equals": "eşit değil"
+    "Not Equals": "eşit değil",
+    "Greater Than": "Büyüktür",
+    "Greater Than or Equal": "Büyüktür veya Eşittir",
+    "Less Than": "Daha az",
+    "Less Than or Equal": "Az veya eşit"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/zh.json b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/zh.json
index ce1cccd974..fc1858970e 100644
--- a/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/zh.json
+++ b/Source/Extensions/Blazorise.DataGrid/Resources/Localization/DataGrid/zh.json
@@ -22,6 +22,10 @@
     "Starts With": "以。。開始",
     "Ends With": "以。。結束",
     "Equals": "等於",
-    "Not Equals": "不等於"
+    "Not Equals": "不等於",
+    "Greater Than": "比...更棒",
+    "Greater Than or Equal": "大於或等於",
+    "Less Than": "少於",
+    "Less Than or Equal": "小於或等於"
   }
 }
\ No newline at end of file
diff --git a/Source/Extensions/Blazorise.DataGrid/_DataGridMenuFilter.razor b/Source/Extensions/Blazorise.DataGrid/_DataGridMenuFilter.razor
index 21b16b2cfc..1aacee300c 100644
--- a/Source/Extensions/Blazorise.DataGrid/_DataGridMenuFilter.razor
+++ b/Source/Extensions/Blazorise.DataGrid/_DataGridMenuFilter.razor
@@ -2,7 +2,7 @@
 @typeparam TItem
 
 
-    
+    
         
     
     
@@ -11,12 +11,25 @@
             {
                 
                     
-                        
+                            @{
+                                var isNumericOrDate = Column.ColumnType == DataGridColumnType.Numeric || Column.ColumnType == DataGridColumnType.Date;
+                            }
+                            @if ( !isNumericOrDate )
+                            {
+                                @Localizer.Localize( ParentDataGrid.Localizers?.FilterMethodContainsLocalizer, "Contains" )
+                                @Localizer.Localize( ParentDataGrid.Localizers?.FilterMethodStartsWithLocalizer, "Starts With" )
+                                @Localizer.Localize( ParentDataGrid.Localizers?.FilterMethodEndsWithLocalizer, "Ends With" )
+                            }
+                            @Localizer.Localize( ParentDataGrid.Localizers?.FilterMethodEqualsLocalizer, "Equals" )
+                            @Localizer.Localize( ParentDataGrid.Localizers?.FilterMethodNotEqualsLocalizer, "Not Equals" )
+                            @if ( isNumericOrDate )
+                            {
+                                @Localizer.Localize( ParentDataGrid.Localizers?.FilterMethodContainsLocalizer, "Greater Than" )
+                                @Localizer.Localize( ParentDataGrid.Localizers?.FilterMethodContainsLocalizer, "Greater Than Or Equal" )
+                                @Localizer.Localize( ParentDataGrid.Localizers?.FilterMethodContainsLocalizer, "Less Than" )
+                                @Localizer.Localize( ParentDataGrid.Localizers?.FilterMethodContainsLocalizer, "Less Than Or Equal" )
+                            }
                         
                     
                 
@@ -33,12 +46,12 @@
             else
             {
                 @ParentDataGrid.FilterMenuTemplate( new( Column,
-                    () => Column.GetFilterMethod() ?? ParentDataGrid.FilterMethod,
+                    () => Column.GetFilterMethod() ?? Column.GetDataGridFilterMethodAsColumn(),
                     () => Column.Filter.SearchValue,
                     EventCallback.Factory.Create( this, async ( newFilterValue ) => await ParentDataGrid.OnFilterChanged( Column, newFilterValue ) ),
-                    EventCallback.Factory.Create( this, Column.SetFilterMethod ),
-                    EventCallback.Factory.Create( this, ParentDataGrid.FilterData),
-                    EventCallback.Factory.Create( this, async () => await ParentDataGrid.ClearFilter(Column.Field))))
+                    EventCallback.Factory.Create( this, Column.SetFilterMethod ),
+                    EventCallback.Factory.Create( this, ParentDataGrid.FilterData ),
+                    EventCallback.Factory.Create( this, async () => await ParentDataGrid.ClearFilter( Column.Field ) ) ) )
             }