Skip to content

Fix empty ExtraProperties cells in AbpExtensibleDataGrid#25480

Merged
enisn merged 1 commit into
rel-10.3from
fix/extensible-data-grid-extra-properties-cell
May 28, 2026
Merged

Fix empty ExtraProperties cells in AbpExtensibleDataGrid#25480
enisn merged 1 commit into
rel-10.3from
fix/extensible-data-grid-extra-properties-cell

Conversation

@maliming
Copy link
Copy Markdown
Member

The implicit <DisplayTemplate> context caused the Razor source generator to compile context.Item as IHasExtraProperties into context as IHasExtraProperties (dropping .Item). Since CellDisplayContext<TItem> itself does not implement IHasExtraProperties, the cast was always null and the cell rendered as <!--!--> .

Renaming the context with Context="rowContext" produces the expected rowContext.Item as IHasExtraProperties codegen and the cell now displays the extension property value.

Affects every page using AbpExtensibleDataGrid with JSON-only ExtraProperties[xxx] columns (Saas Tenants, Identity Users, etc.).

Reported in https://abp.io/support/questions/10690.

The implicit DisplayTemplate context caused the Razor source generator
to compile 'context.Item as IHasExtraProperties' into
'context as IHasExtraProperties' (dropping the .Item access). Since
CellDisplayContext<TItem> itself does not implement IHasExtraProperties,
the cast was always null and the cell rendered empty.

Renaming the context with Context="rowContext" produces the correct
'rowContext.Item as IHasExtraProperties' codegen and the cell now
shows the property value.
Copilot AI review requested due to automatic review settings May 26, 2026 13:38
@maliming maliming added this to the 10.3-patch milestone May 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes AbpExtensibleDataGrid rendering for ExtraProperties[...] columns by explicitly naming the DisplayTemplate context so Razor codegen references the correct CellDisplayContext<TItem>.Item (preventing the cast from being applied to the context object itself).

Changes:

  • Add Context="rowContext" to the DisplayTemplate used for ExtraProperties[...] columns.
  • Update template references from context.Item to rowContext.Item to ensure correct generated code.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.79%. Comparing base (d3c2181) to head (ad6de43).

Files with missing lines Patch % Lines
...BlazoriseUI/Components/AbpExtensibleDataGrid.razor 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           rel-10.3   #25480      +/-   ##
============================================
+ Coverage     49.37%   49.79%   +0.42%     
============================================
  Files          3670     3609      -61     
  Lines        123598   120822    -2776     
  Branches       9453     9232     -221     
============================================
- Hits          61032    60169     -863     
+ Misses        60743    58847    -1896     
+ Partials       1823     1806      -17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maliming maliming requested review from EngincanV and enisn and removed request for EngincanV May 27, 2026 00:30
@enisn enisn merged commit 36546b2 into rel-10.3 May 28, 2026
4 of 5 checks passed
@enisn enisn deleted the fix/extensible-data-grid-extra-properties-cell branch May 28, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants