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

ejs-grid is not a known element:

Hi Team,

 am trying to use Grid in my application. I have already performed the following steps:

  1. npm install @syncfusion/ej2-angular-grids --save
  2. I added following line in my app.module.ts: import { GridModule } from '@syncfusion/ej2-angular-grids';
  3. I added the GridModule to the NgModule Imports 
  4. I checked the dependencies in my package.json :"@syncfusion/ej2-angular-grids": "^19.1.54" 
  5. I added the <ejs-grid></ejs-grid>
But I still get this error message:

'ejs-grid' is not a known element:
1. If 'ejs-grid' is an Angular component, then verify that it is part of this module.
2. If 'ejs-grid' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

Regards, 
Matthias Endres

3 Replies 1 reply marked as answer

AG Ajith Govarthan Syncfusion Team April 6, 2021 11:42 AM UTC

Hi Matthias, 

Thanks for contacting Syncfusion support. 

Query:  I am trying to use Grid in my application. I have already performed the following steps: 

Based on your query we suspect that you have not added the Grid module properly in your Grid application. So, we have prepared sample in that we have added the Grid modules and rendered the Grid Component properly. For your convenience we have attached the sample please refer them for your reference. 

Code Example: 
App.module.ts 

import { CheckBoxModule } from '@syncfusion/ej2-angular-buttons'; 

import { DropDownListAllModule } from '@syncfusion/ej2-angular-dropdowns'; 

import { DatePickerAllModule } from '@syncfusion/ej2-angular-calendars'; 

import { ToolbarModule } from '@syncfusion/ej2-angular-navigations'; 

import { NumericTextBoxAllModule } from '@syncfusion/ej2-angular-inputs'; 

import { DialogModule } from '@syncfusion/ej2-angular-popups'; 

import { GridAllModule } from '@syncfusion/ej2-angular-grids'; 

import { HttpModule } from '@angular/http'; 
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 
import { RouterModule } from '@angular/router'; 
import { CommonModule } from '@angular/common'; 
import { BrowserModule } from '@angular/platform-browser'; 
import { NgModule } from '@angular/core'; 

import { AppComponent } from '../app.component'; 

@NgModule({ declarations: [ AppComponent ], imports: [ CommonModule, ToolbarModule, GridAllModule, BrowserModule,       NumericTextBoxAllModule, DialogModule, DatePickerAllModule, DropDownListAllModule, ReactiveFormsModule, FormsModule, CheckBoxModule], providers: [], bootstrap: [AppComponent] 
}) 
export class AppModule { } 



Please get back to us if you need further assistance. 

Regards, 
Ajith G. 


Marked as answer

MA Matthias April 6, 2021 05:29 PM UTC

Thank you very much

Yes, the mistake was that i used GridModule instead of GridAllModule. 

Unfortunately, in the documentation i always saw GridModule in all the examples.

Thanks again for the help.

Regards,
Matthias Endres


AG Ajith Govarthan Syncfusion Team April 7, 2021 01:57 PM UTC

Hi Matthias, 

Thanks for the update.  

We are happy to hear that your issue has been resolved. 

The GridAllModule will inject all the feature of the Grid and the Grid Module also renders Grid but with some minimal features but you can externally inject the needed modules in your Grid application . For your convenience we have attached the sample please refer them for your reference. 


Please get back to us if you need further assistance. 

Regards, 
Ajith G. 


Loader.
Up arrow icon