Load 2nd grid based on selected row and association table?

I’m using DhtmlxGrid with Rails right now (dhtmlx.com/blog/?p=426#more-426)

Would it would be possible for the selection in one grid to cause a 2nd grid to be loaded with records, where the loaded records are based on a separate relationship table? Say I have a ‘people’ table loaded into a ‘grid_1’. When I select a person in grid_1, I’d like a 2nd grid load with people records for anyone that is a child of the selected person (where this relationship would be defined in a ‘parents’ table containing people id’s in ‘child_id’ and ‘parent_id’ columns.

I thought this would be hard to explain and drawing it out might help:

Thanks for any help - much appreciated.

You can use “onRowSelect” to detect which row in selected in one grid and then reload second grid:

grid1.attachEvent(“onRowSelect”,function(row_id,cell_index){
grid2.clearAll()
grid2.load(url);
})