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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

rowSelected event not firing in prod mode

Thread ID:

Created:

Updated:

Platform:

Replies:

140623 Oct 29,2018 02:59 PM UTC Nov 1,2018 12:34 PM UTC Angular - EJ 2 3
loading
Tags: Grid
Martin
Asked On October 29, 2018 02:59 PM UTC

Hello,

The rowSelected event of the grid is firing as expected with "ng serve",
but no event is fired when in production mode (ng build --prod). There are no errors in the console.
app.component.ts, app.module.ts and package.json are attached to reproduce the error.
Thanks in advance.


Attachment: tmp_93b50317.zip

Madhu Sudhanan P [Syncfusion]
Replied On October 30, 2018 08:41 AM UTC

Hi Martin, 
 
Thanks for contacting Syncfusion support. 

Query : No event is fired when in production mode (ng build --prod). 
 
We have checked your query and tried to reproduce the issue but it is unsuccessful at our end. From your code, We have prepared a sample in which events are fired in production mode. Please use the command as “npm run startp” to run the sample. Please find the below code and sample link for your reference. 
 
 
If you still facing this same issue, Please import SelectionService module in your app.module.ts file as below. 
 
[app.module.ts] 
import { BrowserModule } from '@angular/platform-browser'; 
import { NgModule } from '@angular/core'; 
import { AppComponent } from './app.component'; 
import { GridModule, SelectionService } from '@syncfusion/ej2-angular-grids'; 
 
@NgModule({ 
  declarations: [AppComponent], 
  imports: [ 
    BrowserModule, GridModule 
  ], 
  providers: [SelectionService], 
  bootstrap: [AppComponent] 
}) 
export class AppModule { } 


Regards, 
Madhu Sudhanan P 


Martin
Replied On October 31, 2018 08:31 AM UTC

Thanks for your response Madhu,
I've forgotten to say that the problem only  occurs in recent versions of angular. De example you sended is angular 5.2 and it works as expected, but it doesn't work in new versions. Thats the reason I attached package.json with the angular version used. I have made some tests and it seems to work in angular 6.2 with SelectionService in app.module providers section, but not without it. And it doesn't work at all in angular 7.
Thank you

Madhu Sudhanan P [Syncfusion]
Replied On November 1, 2018 12:34 PM UTC

Hi Martin, 

We have tried to reproduce the reported problem by using both the Angular 6 and Angular 7 packages in our sample. But the row selected event handler triggers every time when a row is selected. We have attached the sample for your convenience. Please download the sample from the link below, 
 
Please refer the screenshot of the referred angular package in “package.json” file below, 

 

If you are still facing the issue please get back to us with the following details for better assistance. 
 
1.       Share the “dist” folder of your application. 
2.       Please share the report generated using bundle analyzer, please refer the link below, 

The provided information will help us analyze the problem, and provide you a solution as early as possible. 

Regards, 
Madhu Sudhanan P 


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

or the page will be automatically redirected to 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

;