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
close icon

Value of type 'typeof DataManager' is not callable. Did you mean to include 'new'?

Hello,I was trying to get the details template (https://help.syncfusion.com/angular/grid/row) for the grid on a SPA with Angular2 working. Unfortunately I am stuck with the exception "Value of type 'typeof DataManager' is not callable. Did you mean to include 'new'?". I could not figure out what the problem is.Any ideas?I used http://www.syncfusion.com/downloads/support/directtrac/183067/ze/Angular2Application-880655113874986034  and changed home.components.ts like thisimport { Component } from '@angular/core';import { EJComponents } from 'ej-angular2';@Component({    selector: 'home',    templateUrl: './home.component.html'})export class HomeComponent {    public sections: any;    detailsDataBound(e: any) {        // Here you can get the parent details from "data". EmployeeID is the unique column value in parent row.        var filteredData = e.data["id"];        // the datasource "window.ordersView" is referred from 'http://js.syncfusion.com/demos/web/scripts/jsondata.min.js'        var data = ej.DataManager(this.sections).executeLocal(ej.Query().where("contractSectionId", "equal", parseInt(filteredData), true).take(5)); // form the query to filter the detail row data by using EmployeeID column value.        //detailsElement contains all the elements which are mentioned in the template.        // Here the detailGrid element is changed as ejGrid control        e.detailsElement.find("#detailGrid").ejGrid({            dataSource: data,            columns: ["number", "targetBudget", "currentBudget", "budgetConsumption", "creditorNumber"]        });        // Here the element which has tabcontrol class is changed as ejTab control        e.detailsElement.find(".tabcontrol").ejTab();    }}Cheers,Robert

1 Reply

TS Thavasianand Sankaranarayanan Syncfusion Team July 15, 2017 06:57 AM UTC

Hi Robert, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we are able to reproduce the reported issue from our end. So, we suggest you to create the instance for ej.DataManager() and use that instance for filtering the data using executeLocal() of ejDataManager. 

Refer the below code example. 


  export class GridComponent { 
             
            ----------------- 
            public detailTemp; 
 
            detailsDataBound(e: any) {  
         
   var dm = new ej.DataManager(gridData1); 
 
   var data = dm.executeLocal(new ej.Query().where("EmployeeID", "equal", parseInt(filteredData), true).take(5)); // form the query to filter the detail row data by using EmployeeID column value. 
        e.detailsElement.find("#detailGrid").ejGrid({ 
            allowPaging: true, 
            dataSource: data, 
            columns: ["OrderID", "EmployeeID", "ShipCity", "ShipCountry", "Freight"] 
       }); 
              
        e.detailsElement.find(".tabcontrol").ejTab(); 
        } 



We have prepared a sample and it can be downloadable from the below location. 


Refer the help documentation. 


If we misunderstood your query then please get back to us. 

Regards, 
Thavasianand S. 


Loader.
Live Chat Icon For mobile
Up arrow icon