Open Closed

Open Entity History Modal from Blazor Page #4911


User avatar
0
maggieryanmail@gmail.com created
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

How do I open the entity history change modal from my index page in blazor?

I tried:

@inject EntityChangeHistoryModal EntityHistoryModal;

await EntityHistoryModal.OpenAsync(EntityFullName, entityId.ToString());

I get a Null reference exception.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

4 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    Can you share the full error logs? thanks.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    You can try this:

    .razor file

    <EntityChangeHistoryModal @ref="EntityChangeHistoryModal"/>
    

    .razor.cs file

    protected EntityChangeHistoryModal EntityChangeHistoryModal;
    
    public async Task OpenEntityChangeHistoryModal(Guid id)
    {
      await EntityChangeHistoryModal.OpenAsync(EntityTypeFullName, id.ToString())
    }
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maggieryanmail@gmail.com created

    That worked - thank you!

    Is there any way to modify the contents of the modal?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    You have to replace the component: https://docs.abp.io/en/abp/latest/UI/Blazor/Customization-Overriding-Components?UI=Blazor

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 09, 2026, 11:56
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.