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

Events Stop Working With The Inclusion Of this.JsRuntime.Ejs().LoadLocaleData

I wanted to format a currency column in my grid so I inserted this code:

    protected override void OnAfterRender(bool firstRender)
    {
           this.JsRuntime.Ejs().LoadLocaleData("en-GB.json").SetCulture("en-GB").SetCurrencyCode("GBP");
    }

After I did the  this grid events such as:
        public void RowSelectedHandler(RowSelectEventArgs<Job> args)
    {
        vm.selectedJob = (Job)args.Data;
    }

stopped working. 
Is this a bug to be sorted? 

1 Reply

RS Renjith Singh Rajendran Syncfusion Team November 29, 2019 09:46 AM UTC

Hi Paul, 

Thanks for contacting Syncfusion support. 

We suggest you to call the “SetCurrencyCode” only at initial render by checking the condition for initial render. Please use the below code to overcome the problem you are facing. We have prepared a sample based on this scenario. Please download the sample from the link below, 

Please use the code below, 

 
    protected override void OnAfterRender(bool firstRender) 
    { 
        if (firstRender) 
        { 
            this.JsRuntime.Ejs().LoadLocaleData("wwwroot/en-GB.json").SetCulture("en-GB").SetCurrencyCode("GBP"); 
        } 
    } 


Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 


Loader.
Live Chat Icon For mobile
Up arrow icon