- Home
- Forum
- Angular - EJ 2
- TreeGrid height
TreeGrid height
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.
SIGN IN To post a reply.
2 Replies
SE
Sathyanarayanamoorthy Eswararao
Syncfusion Team
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
VN
Vignesh Natarajan
Syncfusion Team
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.
SIGN IN To post a reply.
- 2 Replies
- 3 Participants
-
UN Unknown
- Dec 27, 2018 01:39 PM UTC
- Jan 9, 2019 09:33 AM UTC