Please i wanna use grid with add/editexternal form template and it gives me error when using template for column then after comment it throws exception this errorMessage: Cannot read property '_viewRef' of null
import { Component, Input, ViewChild, ViewEncapsulation } from '@angular/core';
import { GridComponent } from 'ej-angular2/src/ej/grid.component';
//import { EJ_Grid_DetailTemplate } from '../Shared/GridDetailTemplate';
@Component({
moduleId: module.id,
selector: 'Model-Setting-Dialog',
templateUrl: '../../../../View/StructuredSketch/ModelSettingDialog.component.html',
styles: [
'.e-dialog.e-widget-content { background: none !important }'
]
})
export class ModelSettingDialog {
@Input() CurrentViews: object;
@ViewChild('grid')
public currentViewsGrid: GridComponent;
public editSettings;
public toolbarItems;
constructor() {
this.editSettings = { allowEditing: true, allowAdding: true, allowDeleting: true, editMode: "externalformtemplate", externalFormTemplateID: "#template" };
this.toolbarItems = { showToolbar: true, toolbarItems: ["add", "edit", "delete", "update", "cancel"] };
}
getSelectedValue() { }
onActionComplete(e: any) {}
}