Hi
currently the parent and child records are displayed using tree grid in angular 12 and pagination is applied .
if any parent has more child records which are are accomidated in current page then the remaining children rows are moving to next page so this is confusiong to user .
can't we move the parent to next page if the children rows are more and cannot accommodate in the same page ?
Hi Dileep,
Thanks for contacting syncfusion forum.
Query: can't we move the parent to next page if the children rows are more and cannot accommodate in the same page ? ]
Based on your query, we suggest you use the pageSizeMode property as “Root”. While setting the pageSizeMode as Root, only the root level or the 0th level records are considered in records count.
Please refer to the below code example,
|
<ejs-treegrid #treegrid [dataSource]='data' childMapping='subtasks' height='350'
[treeColumnIndex]='1' [allowPaging]=true [pageSettings]='pageSettings'>
App.component.ts
ngOnInit(): void { this.data = sampleData; this.pageSettings = { pageSize: 2, pageSizeMode: 'Root' }; }
|
Please refer to the below sample,
https://stackblitz.com/edit/angular-hwgykk?file=app.component.ts
Please refer to the below help documentation,
https://ej2.syncfusion.com/angular/documentation/treegrid/paging/
Please refer to the below API documentation,
https://ej2.syncfusion.com/angular/documentation/api/treegrid/pageSettingsModel/#pagesizemode
Kindly get back to us for further assistance.
Regards,
Pon selva
But the page footer is not fixed it is going down when childeres are expanding ?
Hi Dileep,
Query#:- But the page footer is not fixed it is going down when childeres are expanding ?
We are quite unclear of your query(whether paging is not fixed or else records going down on expanding).
Refer to the Video demo:- (paging remains fixed)
https://www.syncfusion.com/downloads/support/forum/174325/ze/demo873571669.zip
So we request you to share us the following details to assist you in right way.
Regards,
Farveen sulthana T
the requirement is the page should be fixed and at the same time the children should not go to next page when expanded , everything should be come in same page .
Hi Dileep,
Thanks for the update.
Query: the requirement is the page should be fixed and at the same time the children should not go to next page when expanded , everything should be come in same page .
Based on your query, we suggest you use the pageSizeMode property as “Root” and set the height property of the treegrid. While setting the pageSizeMode as Root, only the root level or the 0th level records are considered in records count.
Please refer to the below code example,
|
<ejs-treegrid #treegrid [dataSource]='data' childMapping='subtasks' height='350'
[treeColumnIndex]='1' [allowPaging]=true [pageSettings]='pageSettings'>
App.component.ts
ngOnInit(): void { this.data = sampleData; this.pageSettings = { pageSize: 2, pageSizeMode: 'Root' }; }
|
Please refer to the below sample,
https://stackblitz.com/edit/angular-hwgykk-ehhoi8?file=app.component.html
Please refer to the below help documentation,
https://ej2.syncfusion.com/angular/documentation/treegrid/paging/
Please refer to the below API documentation,
https://ej2.syncfusion.com/angular/documentation/api/treegrid/pageSettingsModel/#pagesizemode
https://ej2.syncfusion.com/angular/documentation/api/treegrid/height
Kindly get back to us for further assistance.
Regards,
Pon selva