BoldDeskBoldDesk is now live on Product Hunt with a special offer: 50% off all plans. Let's grow together! Support us.
import { Component,ViewChild, OnInit, AfterViewInit } from '@angular/core';
import { sampleData } from './jsontreegriddata';
import { DataManager, WebApiAdaptor, Query } from '@syncfusion/ej2-data';
import { TreeGridComponent, FilterService } from '@syncfusion/ej2-angular-treegrid';
const SERVICE_URI: string = 'https://ej2services.syncfusion.com/production/web-services/api/SelfReferenceData' ;
@Component({
selector: 'control-content',
templateUrl: 'default.html'
})
export class DefaultComponent implements OnInit, AfterViewInit {
public data: DataManager;
public query: Query;
public height: number;
public allowPaging: boolean = false;
@ViewChild('treegrid')
public treegrid: TreeGridComponent;
ngOnInit(): void {
this.data = new DataManager({ url: SERVICE_URI , adaptor: new WebApiAdaptor, crossDomain: true });
this.query = new Query().addParams("hi", "hi");
}
ngAfterViewInit(): void {
this.treegrid.grid.height = 500;
setTimeout(() => {
this.treegrid.grid.height = 300;
this.allowPaging = true;
}, 2000)
} |