Subgrids displayed by row

I am trying to use your subgrid to display two tables in my database that have related data. What i want to do is have the subgrid be specific to the row that is selected. The two tables that I am using have id’s in common, so i want to be able to just display the row in my second table that corresponds to the id in the first table when the subgrid is displayed. I don’t want to display the whole table every time the subgrid is displayed. Is there any way that I can do this?

Technically it possible by using some kind of filterBy functionality against sub-grid, so it will show only necessary rows.
But in such usecase , the more simple solution would be to have two grids , with onRowSelect event attached to the frist one. When user selects record in first grid, onRowSelect event fires and you can show any necessary info in second grid.

Well what I want to be able to do is that when the second grid is displayed, I want the user to be able to edit the data in both grids and be able to save those changes.  I just don’t want to display the related data; i want the user to be able to make changes to both tables at the same time.  Will the onRowSelected function accomplish this task?

This will work as well.
In case of recommended solution, the second grid is a separate grid instance , which can work as normal grid. So you can save data from it in any possible way.
Please check attached sample. (85 KB)

Is there any way to display the second subgrid by matching it up with an id in the first grid.  For instance, the two tables that I am trying to present have there id’s in common.  In the second table, there is a column called portal_id which corresponds to the id in the first table.   Is there anyway to do the onRowSelected function by a column in my table rather than doing it by the id and having multiple xml files that corresponds to the id of the grid.  I was looking at your example and saw that you had three separate xml files for all of the individual sub grids. Is there anyway that I can avoid making multiple xml files for each individual row because if I have to do it this way, i will have to generate a whole lot of xml files for each individual row.  Is there any way to do this or is generating multiple the xml files my only option?

The attached sample uses static XML, but common approach is use dynamic server side script, so you will have in event code
so related grid will be filled with data based on selected row in master grid.
In such case you will need any static files at all, server side script will fetch necessary info rom DB and will output it as XML.

It also possible to implement similar behavior by filtering - please check attached sample.

384798.ZIP (89 KB)