1

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.

1
  • <tr ng-repeat="cells in CouponsList.CellPhones"> <td><button ng-click="doStuff($index+1)">{{cells.localVendorAddress}}</button></td> Its supposed to be like this... You need an iterator Commented Apr 5, 2018 at 5:35

1 Answer 1

1

try rowRenderIndex or $parent.$index

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

or

ng-click="grid.appScope.selectItem($event, $parent.$index);"
Sign up to request clarification or add additional context in comments.

4 Comments

cool, rowRenderIndex its working for me. thanks. even if i tried with grid.renderContainers.body.visibleRowCache.indexOf(row)
@Akhil Please accept this answer if it resolved your issue
so if I have that click event in a child hierarchy then should I do like $parent.$parent.$index?
rowRenderIndex is returning the index of visible row only

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.