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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dialog button in dialog does not fire OnClick event anymore.

Thread ID:

Created:

Updated:

Platform:

Replies:

150748 Jan 17,2020 10:25 PM UTC Jan 20,2020 05:21 PM UTC Blazor 4
loading
Tags: Dialog
Admir Hodžic
Asked On January 17, 2020 10:25 PM UTC

On  version  v17.4.43  looks like buttons  in  Dialog does not fire events on click
This was working in version V17.4.40 Now I do not get fire event on click of buuton
Is there something new I realy did not get breaking changes for dialog or digalog buttons


@using Microsoft.AspNetCore.Hosting

@using Syncfusion.EJ2.Blazor.Popups;
@using Syncfusion.EJ2.Blazor.Buttons;
@using System.IO;
@inject IWebHostEnvironment hostingEnv;



<div class="@CssKlasa">
    <button class="e-btn" @onclick="@OnBtnClick">Isprazni folder</button>
    <EjsDialog @ref="DialogObj" Width="335px" Visible="false" CloseOnEscape="true" IsModal="true">
        <DialogTemplates>
            <Header>Da li ste siguni da želite isprazniti CDR folder   </Header>
            <Content> <p>U folderu sam našao @datoteka datoteka</p><br /><p style="white-space: pre-line">@greska</p> </Content>
        </DialogTemplates>
        <DialogButtons>
            <DialogButton ButtonModel="@DialogBtnOk" OnClick="DialogBtnOkClicked"></DialogButton>
            <DialogButton ButtonModel="@DialogBtnJok" OnClick="DialogBtnJokClicked"></DialogButton>
        </DialogButtons>

        <DialogAnimationSettings Effect="@DialogEffect.None"></DialogAnimationSettings>
        <DialogEvents OnOpen="OnOpen"></DialogEvents>
    </EjsDialog>
</div>
@code {

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

    [Parameter]
    public EventCallback<bool> ObrisaoSamContentFoldera { get; set; }

    string greska = string.Empty;

    EjsDialog DialogObj;

    private ButtonModel DialogBtnOk = new ButtonModel
    {
        Content = "Obriši",
        IsPrimary = true,
        IconCss = "far fa-trash-alt"
    };
    private ButtonModel DialogBtnJok = new ButtonModel
    {
        Content = "Zatvori",

    };
    long datoteka = 0;
    private void OnBtnClick()
    {
        this.DialogObj.Show();
    }
    private void DialogBtnOkClicked()
    {
        try
        {
            System.IO.DirectoryInfo di = new DirectoryInfo(System.IO.Path.Combine(hostingEnv.ContentRootPath, "par"));

            foreach (System.IO.FileInfo file in di.GetFiles())
            {
                file.Delete();
            }
            ObrisaoSamContentFoldera.InvokeAsync(true);
            this.DialogObj.Hide();
        }
        catch (Exception ex)
        {
            greska = $"Nisam uspijeo obrisati daoteke sa greškom{ex.Message}";
        }
    }
    private void DialogBtnJokClicked()
    {
        this.DialogObj.Hide();
    }
    private void ObrisiFolderClicked()
    {
        this.DialogObj.Show();
    }
    private void OnOpen()
    {


        this.datoteka = Directory.GetFiles(System.IO.Path.Combine(hostingEnv.ContentRootPath, "par"), "*.*").Length;
    }

}


James
Replied On January 20, 2020 04:03 AM UTC

I have the same issue.

Admir Hodžic
Replied On January 20, 2020 07:33 AM UTC

My project is on v3.1.1 ov Microsoft nuggets.
Is yours also on 3.1.1, maybe new update of Microsoft tools brake this functionality  

Indrajith Srinivasan [Syncfusion]
Replied On January 20, 2020 12:37 PM UTC

Hi Admir, 
  
Currently, we validating the reported issue, will update further details shortly.  
  
Regards,
Indrajith
 


Indrajith Srinivasan [Syncfusion]
Replied On January 20, 2020 05:21 PM UTC

Hi Admir,

Greetings from Syncfusion support
 
 
We suspect this to be a defect from our end, we will include this fix in our next nuget release until then can you use the below nuget package to resolve the issue in your end.

Sample: https://www.syncfusion.com/downloads/support/forum/150748/ze/BlazorDialog-2061670139

Nuget package: https://www.syncfusion.com/downloads/support/forum/150748/ze/Syncfusion.EJ2.Blazor.17.4.0.46-1062011802

Can you please try out the above solution and let us know if you face any difficulties.
 
 
Regards, 
Indrajith 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon