Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141685 | Dec 27,2018 01:39 PM UTC | Jan 9,2019 09:33 AM UTC | Angular - EJ 2 | 2 |
![]() |
Tags: TreeGrid |
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)
} |
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.
This page will automatically be redirected to the sign-in page in 10 seconds.