Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
14
rated 0 times [  19] [ 5]  / answers: 1 / hits: 51790  / 9 Years ago, mon, january 11, 2016, 12:00:00

AgGrid expects node(s) to be passed in to lot of it's data functions. How do you get a node by index? Look at the snip below:



api.forEachNode(function(node){
api.refreshRows([node]);
})


I can pass the node parameter to refreshRows() function since I'm getting it through forEachNode().



How do you get a node by index without iterating through forEachNode() ?


More From » angularjs

 Answers
42

You can use getVirtualRow() method to get a single row. This function is a part of the Row Model. You can get the Row Model by getModel() function.



var model = api.getModel();
console.log(model.getVirtualRow(idx));

[#63772] Friday, January 8, 2016, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
breap

Total Points: 606
Total Questions: 96
Total Answers: 108

Location: Djibouti
Member since Sun, Feb 27, 2022
2 Years ago
breap questions
Thu, Jun 24, 21, 00:00, 3 Years ago
Wed, Mar 18, 20, 00:00, 4 Years ago
Mon, Oct 7, 19, 00:00, 5 Years ago
;