igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

igx-tree-grid does not expanding last row correctly if we are not setting height for grid

Open prabakaran1311 opened this issue 7 years ago • 8 comments

Description

i am using igx-tree-grid in angular 7 i am showing datas in grid rows based on screen size dynamically. if each row contains 15 records in tree grid its not showing full records in tree grid only shows part of records in grid. its not expanding fully because i am not setting grid height. i have set grid height as null because i dont want page scroll it should be dynamic.

  • igniteui-angular version: 7.2.4
  • browser: all browsers

below is the sample code

<igx-tree-grid #grid1 [data]="allData | async" childDataKey="Properties" [width]="'100%'" [paging]="pagingEnable" [perPage]="pageSize" [allowFiltering]="true" [height]="null" [showToolbar]="true" [columnHiding]="true" [autoGenerate]="false" [toolbarTitle]="GridName" expansionDepth="0" [displayDensity]="'compact'" (onDataPreLoad)="processData($event,false)" (onSortingDone)="processData($event,true)" (onFilteringDone)="processData($event,false)" [emptyGridMessage]="gridMessageEmpty"> <igx-column></igx-column> </igx-tree-grid>

Note: I am using remote pagination, sorting and filtering.

Attachments

below screenshot i have expanded last row of the grid last row contains 10tree data but it shows only one data while expanding the grid. i need to show all the data in the treegrid. i dont want to set height for grid. if i am expanding last row it should expand the grid. expand

prabakaran1311 avatar May 07 '19 10:05 prabakaran1311

I believe this might be caused by the paging. Please note that the Tree Grid paging counts all the records on a page not only the root records. For example if perPage=10, you will see 10 records on the page no matter if they are root or child records.

DiyanDimitrov avatar May 08 '19 07:05 DiyanDimitrov

@DiyanDimitrov no if i am expanding 1st row in tree grid it shows all the records in tree. actually it having tree data while expanding it shows only one. while expanding tree grid it should expand the grid height also.

prabakaran1311 avatar May 08 '19 09:05 prabakaran1311

@prabakaran1311, I am not able to reproduce this issue. Here is a stackblitz sample which demonstrates that the grid height is increased when expanding a row https://stackblitz.com/edit/angular-7ba4ut. Could you please modify this sample or provide another one which demonstrates the issue?

DiyanDimitrov avatar May 09 '19 08:05 DiyanDimitrov

@DiyanDimitrov in the above example itself add datas in grid until full page height and expand the last row and check it not showing the last row tree grid data. below screenshot shows the issue in stackblitz igxxxx

prabakaran1311 avatar May 10 '19 07:05 prabakaran1311

@prabakaran1311, I believe this is because the div container does not show a scrollbar. I have modified the sample to enable the scrollbar, let me know if you are still experiencing the issue.

DiyanDimitrov avatar May 10 '19 08:05 DiyanDimitrov

@DiyanDimitrov its not the scrollbar issue actually its removing data from DOM itself if i am expanding last row.

prabakaran1311 avatar May 10 '19 10:05 prabakaran1311

@prabakaran1311, Could you fork my sample, modify it so that the issue is reproducible and send me the new link?

DiyanDimitrov avatar May 10 '19 11:05 DiyanDimitrov

@prabakaran1311, Are you still experiencing this issue? If not, we could close it.

DiyanDimitrov avatar Jun 03 '19 11:06 DiyanDimitrov