Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

4
Votes

Issue #1: Using the "Menu" FilterType for text or date filters, navigating away from the page (or refreshing the page) and attempting to filter again on the same column leads to an unhandled error at runtime, and filter dialog does not open.
  1. Run the app using the code provided below
  2. Click on the "Customer Name" filter
  3. Filter using any of the options (for example, starts with = an)
  4. Navigate to another page and then return back to page with grid (or just refresh the page)
  5. Click on the customer name filter
  6. Observe that the filter dialog doesn't open, and there is a runtime error in the console (System.InvalidCastException: Specified cast is not valid)
  7. You can repeat the same steps above with the "Order Date" filter and see that the same error occurs with dates
Issue #2: Using the "Menu" FilterType for numeric filters, the user is required to execute the filter again when returning to the page (the grid doesn't present the filtered data by default - instead the contents are empty)
  1. Run the app using the code provided below
  2. Click on the Order ID filter
  3. Filter using any of the options (for example, greater than 1003)
  4. Navigate to another page and then return back to page with grid (or just refresh the page)
  5. Observe that the grid contents are empty
  6. You can click on the Order ID filter again and then click "Filter" to display the contents again - however this is not user friendly.
  7. The same issue applies to the Freight column (so it appears this can affect both integers and doubles)
Issue #3: Using the "Excel" or "CheckBox" FilterType for numeric or date filters, the grid doesn't present the filtered data after returning to the page, instead it is empty and an error occurs when attempting to re-open the filter dialog
  1. Run the app using the code provided below (but change the FilterType to Excel or CheckBox)
  2. Click on the Order ID filter
  3. Filter using any of the options (for example set a checkbox next to 1002 and 1003, or for Excel filter you can try to use the advanced options like greater than 1003)
  4. Navigate to another page and then return back to page with grid (or just refresh the page)
  5. Observe that the grid contents are empty
  6. Click on the Order ID filter
  7. Observe that the filter dialog doesn't open, and there is a runtime error in the console (System.ArgumentException: Argument types do not match)
  8. The same issue applies to the Freight and also the Order Date column (so it appears this can affect integers, doubles, and dates)
Issue #4: Using the "FilterBar" FilterType for numeric filters, the grid doesn't present the filtered data after returning to the page, instead it is empty
  1. Run the app using the code provided below (and either change the FilterType to FilterBar or remove the GridFilterSettings completely)
  2. Set a value on the Order ID filter
  3. Navigate to another page and then return back to page with grid (or just refresh the page)
  4. Observe that the grid contents are empty
  5. Set focus on the Order ID filter bar and hit enter
  6. Notice that the filter is now cleared completely (expectation was it would retain the correct filter state based on value supplied)
  7. The same issue applies to the Freight column (so it appears this can affect both integers and doubles)
#Issue #5: Using the "FilterBar" FilterType for date filters, navigating away from the page and returing (or refreshing the page) leads to an unhandled error at runtime.
  1. Run the app using the code provided below (and either change the FilterType to FilterBar or remove the GridFilterSettings completely)
  2. Set a value on the Order Date filter
  3. Navigate to another page and then return back to page with grid (or just refresh the page)
  4. Observe that immediately there is a runtime error in the console (System.InvalidCastException: Specified cast is not valid)
It seems there is currently no good way to use the state persistence features while also using filters. Issues #4 and #5 above can be reproduced using exactly your code from the Blazor DataGrid State Management documentation without any modifications. Please advise if I have done something incorrectly or if there is any workaround. Thank you.

Full example code is below (code is taken directly from your documentation except for highlighted change):

@using Syncfusion.Blazor.Grids

<SfGrid ID="Grid" DataSource="@Orders" Height="315" EnablePersistence="true" AllowPaging="true" AllowFiltering="true" AllowGrouping="true" AllowSorting="true">
    <GridFilterSettings Type="FilterType.Menu" />
    <GridColumns>
        <GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" TextAlign="TextAlign.Right" Width="120"></GridColumn>
        <GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer Name" Width="150"></GridColumn>
        <GridColumn Field=@nameof(Order.OrderDate) HeaderText="Order Date" Format="d" Type="ColumnType.Date" TextAlign="TextAlign.Right" Width="130"></GridColumn>
        <GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn>
    </GridColumns>
</SfGrid>

@code {
    public List<Order> Orders { get; set; }

    protected override void OnInitialized()
    {
        Orders = Enumerable.Range(1, 75).Select(x => new Order()
        {
            OrderID = 1000 + x,
            CustomerID = (new string[] { "ALFKI", "ANANTR", "ANTON", "BLONP", "BOLID" })[new Random().Next(5)],
            Freight = 2.1 * x,
            OrderDate = DateTime.Now.AddDays(-x),
        }).ToList();
    }

    public class Order
    {
        public int? OrderID { get; set; }
        public string CustomerID { get; set; }
        public DateTime? OrderDate { get; set; }
        public double? Freight { get; set; }
    }
}