Igniteui-angular: Grid row wise Index property

Created on 12 Jul 2019  路  4Comments  路  Source: IgniteUI/igniteui-angular

Is your feature request related to a problem? Please describe.

rowIndex property for cell is there, but while grouping it will add the summary row index also

general groupby question

Most helpful comment

@shubhamghormade19 , you can search for the data row in the collection of data rows as they are before they pass the grouping pipe. Please, try the following for your index column:

<igx-column [header]="'Index'">
     <ng-template igxCell let-cell="cell">
           {{cell.grid.filteredSortedData.indexOf(cell.row.rowData) + 1}}
     </ng-template>
</igx-column>

All 4 comments

Hello @shubhamghormade19, could you please clarify and provide more information on what exactly you are trying to achieve. Thanks in advance

I am trying to perform index column in table, Which works fine for the normal table.
rowIndex will provide the proper index.
But while grouping table, The rowIndex add the index of that grouping label row too.

@shubhamghormade19 , you can search for the data row in the collection of data rows as they are before they pass the grouping pipe. Please, try the following for your index column:

<igx-column [header]="'Index'">
     <ng-template igxCell let-cell="cell">
           {{cell.grid.filteredSortedData.indexOf(cell.row.rowData) + 1}}
     </ng-template>
</igx-column>

Hi @ChronosSF
Thanks, it works for me

Was this page helpful?
0 / 5 - 0 ratings