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

Command and template columns

Thread ID:

Created:

Updated:

Platform:

Replies:

140975 Nov 16,2018 02:17 PM UTC Nov 28,2018 12:24 PM UTC Angular - EJ 2 7
loading
Tags: Grid
Manolo Capdevila
Asked On November 16, 2018 02:17 PM UTC

Hi,

I've a problem with command columns and template columns since I've updated the controls.

In the grid, if I comment this line

<!-- <e-column headerText='Manage Records' width='160' [commands]='commands'></e-column> -->

it works fine, but If I uncomment this line, data is not load

I attach an example




Attachment: GridCommand_435ccff2.zip

Mohammed Farook J [Syncfusion]
Replied On November 19, 2018 05:48 AM UTC

Hi Manolo, 
 
Thanks for contacting Syncfusion support. 
 
Query: I've a problem with command columns and template columns since I've updated the controls. In the grid, if I comment this line. <!-- <e-column headerText='Manage Records' width='160' [commands]='commands'></e-column>   --> it works fine, but If I uncomment this line, data is not load. 
 
We have validated your query and you don’t inject CommandColumnService in app.module.ts file which is the cause of the issue. So we suggest you to inject the CommandColumnService in app.module.ts file. Please find the below code example and modified sample for your reference. 
 
[code example][app.module.ts] 
... 
import { BrowserModule } from '@angular/platform-browser'; 
import { NgModule } from '@angular/core'; 
import { GridModule, EditService, CommandColumnService } from '@syncfusion/ej2-angular-grids'; 
import { AppComponent } from './app.component'; 
 
@NgModule({ 
  declarations: [ 
    AppComponent 
  ], 
  imports: [ 
    BrowserModule,GridModule 
  ], 
  providers: [EditService, CommandColumnService], 
  bootstrap: [AppComponent] 
}) 
export class AppModule { } 
 
 
Please find the sample in below link. 
 
 
Please get back to us if you need further assistance. 
 
Regards, 
J Mohammed Farook 


Manolo Capdevila
Replied On November 21, 2018 11:11 AM UTC

Hi,

Ok, I've injected CommandColumnsService and works fine.

In example, I'ved modified for use template columns and works fine, but in my project, when I use template columns, the grid show loading and get error str.replace is not a function.

Before, I used template columns without problems




Mohammed Farook J [Syncfusion]
Replied On November 22, 2018 10:26 AM UTC

Hi Manolo, 
 
Query: In example, I'ved modified for use template columns and works fine, but in my project, when I use template columns, the grid show loading and get error str.replace is not a function. Before, I used template columns without problems. 
 
We have validated your query and check the reported problem at our end. It works fine. Here, we have render grid with template column. Please find the below code example and screenshot for your reference. 
 
[code example] 
... 
  <ejs-grid [dataSource]='data' allowPaging='true' [pageSettings]='pageSettings' [editSettings]='editSettings'> 
    <e-columns> 
      <e-column field='OrderID' headerText='Order ID' width='120' textAlign='Right' isPrimaryKey='true' [validationRules]='orderidrules'></e-column> 
      <e-column headerText='Template column' width='120' textAlign='Right'> 
        <ng-template #template let-data> 
          <div> 
            {{data.CustomerID}} 
          </div> 
        </ng-template> 
      </e-column> 
      ... 
     <e-column headerText='Manage Records' width='160' [commands]='commands'></e-column> 
    </e-columns> 
  </ejs-grid> 
 
[screenshot] 
 
 
 
If you still face the problem, could you please share the below information. It will be helpful for further validation. 
 
  • Share Essential JS 2 package version.
  • Share full grid code or sample or reproduce the problem in given sample.
  • Share the replication procedure.
 
Regards, 
J Mohammed Farook 
 


Manolo Capdevila
Replied On November 23, 2018 02:45 PM UTC

Hi,

I attach an example

Attachment: TemplateProblem_68fe2d45.zip

Mohammed Farook J [Syncfusion]
Replied On November 26, 2018 09:57 AM UTC

Hi Manolo, 

Query: In example, I'ved modified for use template columns and works fine, but in my project, when I use template columns, the grid show loading and get error str.replace is not a function. Before, I used template columns without problems.  

We have validated your query with the provided code snippets. The grid was not render due to the npm cache and some package conflicts. In your sample we have found ej2-ng-charts and ej2-ng-base packages. We have changed our package name ej2-ng into ej2-angular  from EJ2 16.3.17 version. We have removed @syncfusion packages and modify the package name like @syncfusion/ej2-angular-charts. Then we have cleaned npm cache. Now the sample works fine. 

Please find the modified sample in below link. 


Please find follow the steps for resolve the package conflicts  

  1. Remove @syncfusion packages from node_modules
  2. Change file name from ej2-ng into ej2-angular in your package.JSON
  3. Clean your npm cache. Please find the following commands
 
                    Local cache – npm cache clean --force 
Global cache –  npm cache clean --force -g 


  
  1. Re-install npm packages using npm install command

Please get back to us if you need further assistance. 
 
Regards, 
J Mohammed Farook 


Manolo Capdevila
Replied On November 28, 2018 08:21 AM UTC

Thanks!

One comment, now, the angular chart documentation doesn't work




Mohammed Farook J [Syncfusion]
Replied On November 28, 2018 12:24 PM UTC

Hi Manolo,  
  
We have analyzed the reported scenario. The preview in the provided UG page is working except the remote data and so we have considered this issue. We will refresh this for Volume 4, 2018 main release which is expected to be out on December 11, 2018.   
  
Please get back to us, if you need any further assistance. 
 
 
Regards, 
J Mohammed Farook 


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

;