Akhil
Akhil

Reputation: 443

how to get row index in cellTemplate of angular ui-grid

ng-click="grid.appScope.selectItem($event,row.entity.$index);" i want to pass row index through this function. Even if i tried with $index,$parent.$index. I am unable to get the index.

Upvotes: 1

Views: 2850

Answers (1)

Ramesh Rajendran
Ramesh Rajendran

Reputation: 38663

try rowRenderIndex or $parent.$index

ng-click="grid.appScope.selectItem($event, rowRenderIndex);"

or

ng-click="grid.appScope.selectItem($event, $parent.$index);"

Upvotes: 1

Related Questions