Programmaticaly select nested item in DataGrid

Hello!
Could you please help me with a problem?

I have a DataGrid that displays several columns. One of column has tree-like structure. Due to the large amount of data, I'm using lazy loading — that is, loading child nodes on demand when a parent node is expanded.

What I need is to open the component with a specific node selected. I tried traversing the path from the root to the target node, expanding each node along the way using ExpandRow, and then selecting the final node with SelectRow.

This approach worked only for the first level of nesting: the root node expanded correctly and displayed its children, but when trying to expand the child node to load its own children, nothing happened — no errors and no data.

Maybe I’m misusing the component. Could you please advise how to properly implement this behavior?

The demo here shows how to expand not only the root level:

Thanks for response! (I tried ideas on my task. Without result :frowning: )This demo https://blazor.radzen.com/datagrid-selfref-hierarchy?theme=material3almost completely corresponds to my task. The first level is open (with which I have no problems). Tell me how to programmatically open a node with an employee Mr. Steven Buchanan

The code of the demo can be observed in the demo itself. All you need to do is to handle the Render event of desired DataGrid and expand desire item - in our case the first item. You can use also Where() extension method to look for specific item according to your conditions.

Thank you so much! Everything works. I just wasn’t attentive enough — your first message really did contain all the necessary information.