Dialog Not Opening

I am working on a POC using Dialog Services and following the example under: "Open page as a dialog" in (Blazor Dialog | a free UI component by Radzen)

What is happening is that I click to open the dialog, and nothing happens -- looks as if the button was never clicked. I have checked the console and no error.

I have tried to make a very simple POC, A Calling Page with a single button that opens a second form in a dialog. To assist, I added two silly lines to serve as breakpoints before and after the open:

string Status = "About to Open"; (The app breaks here)
Status = "Done"; (The app does not het to here)

It's got to be something careless on my end, but I am not finding it. Any help would be greatly appreciated.

My Page:

@page "/POCDialogEdit"

@using Radzen.Blazor

@inject DialogService DialogService

POCDialogEdit

Open page as a dialog

@code {

async Task ShowInlineDialog()
{
    string Status = "About to Open";
    await DialogService.OpenAsync<POCFormInDialog>($"Test Open",
           new Dictionary<string, object>() { { "Message", "Message Passed as Parameter"} },
           new DialogOptions() { Width = "700px", Height = "570px", Resizable = true, Draggable = true });
    
    
    Status = "Done";
}

}

My 2nd Page to be opened in dialog

@page "/POCFormInDialog"

@inject Radzen.DialogService dialogService

@using Radzen.Blazor

This Is to Confirm Call to a Component

Message: @Message

@code {

[Parameter] public string Message { get; set; }

protected override async Task OnInitializedAsync()
{
    if (Message == string.Empty)
    {
        string sMessage = "No Message Provided";
    }

}

protected override async Task OnParametersSetAsync()
{
    if (Message == string.Empty)
    {
        string sMessage = "No Message Provided";
    }
}

}

My modest guess is that you haven't included RadzenDialog component anywhere in your app (in layout).

How to get started with the Radzen Blazor components

See point 6.

1 Like

Iliyan,

This is twice you've helped me in the last week. Thank you, this solved it.

Cheers

Iliyan,

One more quick note of thanks. Your guidance has not only allowed me to solve the issues I asked about, but are also resulting in cleaning up a number of "quirks" I had been finding.

Thanks again, greatly appreciated!

1 Like