<link rel="stylesheet" type="text/css" href="dbnetsuite.css.ashx" /> <script language="JavaScript" src="dbnetsuite.js.ashx"></script>
<script> jQuery(document).ready( init ) function init() { var dbnetgrid1 = new DbNetGrid("dbnetgrid1"); with (dbnetgrid1) { connectionString = "SamplesDatabase" fromPart = "customers" setColumnExpressions("CustomerID","CompanyName", "Address", "City"); setColumnProperty("CustomerID", "display", false); addNestedGrid( configireOrderGrid ) initialize() } } function configireOrderGrid(grid) { with (grid) { fromPart = "orders" toolbarLocation = "hidden" setColumnExpressions("OrderID","CustomerID","EmployeeID","OrderDate","RequiredDate","ShippedDate","ShipVia","Freight","ShipName","ShipAddress","ShipCity","ShipRegion","ShipPostalCode","ShipCountry"); setColumnProperty("CustomerID", "foreignKey", true); setColumnProperty("EmployeeID", "lookup", "select employeeid, lastname + ',' + firstname from employees order by lastname,firstname"); setColumnProperty("CustomerID", "lookup", "select customerid, companyname from customers"); setColumnProperty("ShipVia", "lookup", "select shipperid, companyname from shippers"); addNestedGrid( configireOrderDetailsGrid ) } } function configireOrderDetailsGrid(grid) { with (grid) { fromPart = "[order details]" toolbarLocation = "hidden" setColumnExpressions("OrderID","ProductID", "Quantity", "UnitPrice"); setColumnProperty("OrderID", "foreignKey", true); setColumnProperty("ProductID", "lookup", "select productid, productname from products"); } } </script>
<div id="dbnetgrid1"></div>