We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

The title of the dialogue is not specified from the code

I use the dialog component EjsDialog, I try to set the window title with the code, but it is not displayed.
If I fill in the header attribute in the template, then everything is fine. And when I set Header property in the code - there is title blank. Perhaps this is some kind of bug.


2 Replies

PO Prince Oliver Syncfusion Team May 15, 2019 04:04 PM UTC

Hi Arty, 

Thank you for contacting us. 

We have checked the reported issue in the Dialog header with string format. Unfortunately, we were unable to reproduce the reported issue in our end. Kindly provide us following details  

  • Which version of NuGet package are you used?
  • How do you set the header property at code?
  • Are you using Blazor with visual studio project or Blazor(serverside) with visual studio project?
  • Can you please share your code for reproducing your issue on our end or else share video for betting understanding your issue?

The above information will help us provide a prompt solution. 

Regards, 
Prince  



RR Rajendran R Syncfusion Team May 22, 2019 10:09 AM UTC



Hi Arty, 

The Blazor Dialog provides the following ways to set its header from code. 

  1. If you want to set dialog’s header on page initialization itself, set by overriding “OnAfterRender” method. please find the code snippet below.
 
@functions 
{ 
    EjsDialog EJ2Dialog; 
 
    protected override void OnAfterRender() 
    { 
        this.EJ2Dialog.Header = "Title set from code"; 
    } 
} 
 
 

  1. If you want to set dialog’s header dynamically through event, set using “StateHasChanged” and “DataBind” method of Dialog component. Please find the code snippet below.
 
@functions 
{ 
    EjsDialog EJ2Dialog; 
 
    public void SetHeader() 
    { 
        this.EJ2Dialog.Header = "Set Header on Button click"; 
        StateHasChanged(); 
        this.EJ2Dialog.DataBind(); 
    } 
} 
 
 
Note: Upgrade your nuget package reference to latest version. 
 
We have prepared the sample for your requirement and attached the sample in this link. 
 
 
Regards 
Rajendran R 


Loader.
Live Chat Icon For mobile
Up arrow icon