A child grid can be added to the parent grid as a nested grid which is displayed adjacent to the parent row. To add a nested grid simply create the instance of the control and assign the reference of the child grid control to the NestedGrid property of the parent grid control. You will also need to specify which column in the child grid is the ForeignKey which is matched against the PrimaryKey in the parent control.

Razor
    
DbNetGridCore customersGrid = new DbNetGridCore("northwind", "customers");
customersGrid.Columns = new List() { "CustomerID", "CompanyName", "Address", "City" };
customersGrid.SetColumnProperty("CustomerID", ColumnPropertyType.Display, false);

DbNetGridCore ordersGrid = new DbNetGridCore("northwind", "orders");
ordersGrid.ToolbarLocation = ToolbarLocation.Hidden;
ordersGrid.Columns = new List() { "OrderID", "CustomerID", "EmployeeID", "OrderDate", "RequiredDate", "ShippedDate", "ShipVia", "Freight", "ShipName", "ShipAddress", "ShipCity", "ShipRegion", "ShipPostalCode", "ShipCountry" };
ordersGrid.SetColumnProperty("CustomerID", ColumnPropertyType.ForeignKey, true);
ordersGrid.SetColumnProperty("CustomerID", ColumnPropertyType.Display, false);
ordersGrid.SetColumnProperty("EmployeeID", ColumnPropertyType.Lookup, new Lookup("Employees", "EmployeeId", "lastname + ',' + firstname"));
ordersGrid.SetColumnProperty("ShipVia", ColumnPropertyType.Lookup, new Lookup("Shippers", "ShipperId", "CompanyName"));
ordersGrid.SetColumnProperty("EmployeeID", ColumnPropertyType.Label, "Employee");

customersGrid.NestedGrid = ordersGrid;

DbNetGridCore orderDetailsGrid = new DbNetGridCore("northwind", "[order details]");
orderDetailsGrid.ToolbarLocation = ToolbarLocation.Hidden;
orderDetailsGrid.Columns = new List() { "OrderID", "ProductID", "Quantity", "UnitPrice" };
orderDetailsGrid.SetColumnProperty("OrderID", ColumnPropertyType.ForeignKey, true);
orderDetailsGrid.SetColumnProperty("OrderID", ColumnPropertyType.Display, false);
orderDetailsGrid.SetColumnProperty("ProductID", ColumnPropertyType.Lookup, new Lookup("Products", "ProductId", "ProductName"));
orderDetailsGrid.SetColumnProperty("ProductID", ColumnPropertyType.Label, "Product");

ordersGrid.NestedGrid = orderDetailsGrid;

@customersGrid.Render()