Popup of a blazor page as a child

With Radzen their dialog service permits the popup of any blazor page as a modal child and to get the call back to the parent blazor page. It looks like Syncfusion does it only with winforms. But I might be mistaken. I can certainly have a custom template over Syncfusion dialog, but it is not so friendly in case the form is very complex. It is very handy to be able to use the same blazor page on demand as a parent or as a child. Does Syncfusion offer this type of blazor page use?


3 Replies

PK Priyanka Karthikeyan Syncfusion Team April 3, 2025 01:42 PM UTC

Hi Roman,


Thank you for reaching out to us. You can achieve this functionality using predefined dialogs with SfDialogProvider. The SfDialogProvider allows you to open predefined dialogs anywhere in the application based on SfDialogService settings.

To implement this:

  • Add SfDialogProvider to MainLayout.razor if you want to open dialogs globally from anywhere in the app.
  • Alternatively, add it to a specific page to restrict dialog usage within that page.
  • Ensure that SfDialogProvider is added only once in the application.

For detailed guidance, please refer to the following resources:


🔹 User Guide: Predefined Dialogs - Getting Started
🔹 Live Demo: Predefined Dialog Functionalities


Let us know if you need any further assistance!

 

Regards,

Priyanka K



RO Roman April 3, 2025 02:00 PM UTC

Priyanka, thank you for the reply. I was not asking about the predefined dialogs in general. Is the SfDialogService able to accept a URL or a page’ class and pop up another razor page? If it is not possible to do it with DialogService, then what option SF has to do it?



PK Priyanka Karthikeyan Syncfusion Team April 4, 2025 01:42 PM UTC

Hi Roman,

 

Thank you for the update. If you need to load an external URL within the dialog, you can achieve this by using an <iframe> inside the dialog component. As per your requirements, we’ve prepared a sample implementation for your reference.

 

Below is the code snippet along with the attached sample for your convenience:

 

 

<SfDialog @ref="dialogObj" IsModal="@Options.IsModal" Width="250px" MinHeight="250px" 
        ShowCloseIcon="@Options.ShowCloseIcon" @bind-Visible="@Visibility">

            <DialogTemplates>

                <Header>@Options.Header</Header>

               <Content>

                <iframe class="iframeresponsive-iframe" src="https://www.example.com" width="100%" height="200px" frameborder="0"></iframe>

            </Content>

</DialogTemplates>

            <DialogPositionData X="@Xvalue" Y="@Yvalue"></DialogPositionData>

        </SfDialog>

  

Regards,

Priyanka K



Attachment: ReusableDialogs_df83e209.zip

Loader.
Up arrow icon