Pagination issues on tree grid

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 ? 


5 Replies

PS Pon Selva Jeganathan Syncfusion Team April 13, 2022 12:58 PM UTC

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: 2pageSizeMode: '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




DI Dileep April 13, 2022 01:22 PM UTC

But the page footer is not fixed it is going down when childeres are expanding ? 



FS Farveen Sulthana Thameeztheen Basha Syncfusion Team April 15, 2022 12:27 PM UTC

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.


  1. Video demonstration of the issue you have faced.
  2. Detailed explanation of the issue(with Screenshot).
  3. If possible replicate it in the sample provided on previous update and revert us back.



Regards,

Farveen sulthana T



DI Dileep April 17, 2022 10:41 AM UTC

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 . 



PS Pon Selva Jeganathan Syncfusion Team April 18, 2022 01:47 PM UTC

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: 2pageSizeMode: '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




Loader.
Up arrow icon