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!

0
Votes

When calling ResetPersistDataAsync() on a Syncfusion SfGrid that contains a <GridAggregates> section but no <GridAggregateColumn> elements, the grid throws a JavaScript exception: “Cannot read properties of null (reading 'style')”. This issue occurs because the grid internally checks only whether aggregatesCount is non‑zero, and then attempts to access getFooterContent().querySelector('.e-table').style, assuming the footer table always exists. However, in cases where aggregates are defined but no aggregate columns are present, the footer content is rendered without an .e-table element, causing querySelector('.e-table') to return null and resulting in the runtime error. This prevents ResetPersistDataAsync() from functioning correctly, disrupts grid behavior, and makes it impossible to safely maintain a dynamic aggregates section where the list of aggregate columns may be empty.

Replication steps:
  • Run the attached sample project -.https://blazorplayground.syncfusion.com/rXLHZrtdzmmHWlvq
  • Ensure the grid contains a <GridAggregates> section without any <GridAggregateColumn> entries.
  • Locate and click the button that triggers ResetPersistDataAsync().

  • Open the browser console (F12 → Console).
  • Observe the JavaScript error:
    "Cannot read properties of null (reading 'style')".
  • The error occurs because the grid calls:
    getFooterContent().querySelector('.e-table').style.width = ''
    and .querySelector('.e-table') returns null when no aggregate columns exist.