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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TreeGrid height

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
loading
Tags: TreeGrid
Unknown
Asked On December 27, 2018 01:39 PM UTC

Hello,

I am trying to change TreeGrid height after some time in action but I am unable to do that. I am trying to do it like in this example: https://stackblitz.com/edit/angular-akbdmr-lzixgw?file=default.component.ts

I can see that property allowPaging is working doing it like this but property height is not working properly.

Sathyanarayanamoorthy Eswararao [Syncfusion]
Replied On December 31, 2018 10:13 AM UTC

Hi Customer, 

Thanks for contacting Syncfusion support. 

Query: I am trying to change TreeGrid height after some time in action but I am unable to do that. 
 
We are able to reproduce the mentioned issue on our side also. We have confirmed that the mentioned issue “height is not set for the Treegrid when set through setmodel” as a defect and have logged a defect report for the same. The fix for this issue will be included in the upcoming patch release on January 9 2019. 

Until then we suggest you to use the work around given in the below code example 


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) 
    } 


We have prepared a sample for your convenience, please refer the below link for the sample. 


Regards, 
Sathyanarayanamoorthy 


Vignesh Natarajan [Syncfusion]
Replied On January 9, 2019 09:33 AM UTC

Hi Customer, 
 
We are glad to announce that patch release (v 16.4.46) is rolled out successfully and in that release, we have included the fix for “height is not set for the Treegrid when set through setmodel” issue. 
 
Please get back to us if you need further assistance. 
 
Regards, 
Vignesh Natarajan. 
 


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

Live Chat Icon For mobile
Live Chat Icon