Skip to content
Advertisement

How to get a node by index in ag-grid?

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:

JavaScript

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() ?

Advertisement

Answer

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.

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement