ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: TeeJT on July 22, 2016, 08:12:27 am
-
Can nested grid detail be inside master json data?
This means that the data is embedded in the json data e.g.
{
"data":[
{
"OrderID":10409,
"ContactName":"Yvonne Moncada",
"EmployeeID":3,
"OrderDate":"01/09/1997",
"RequiredDate":"02/06/1997",
"ShippedDate":"01/14/1997",
"ShipVia":"Speedy Express",
"Freight":29.8300,
"ShipName":"Océano Atlántico Ltda.",
"ShipAddress":"Ing. Gustavo Moncada 8585 Piso 20-A",
"ShipCity":"Buenos Aires",
"ShipRegion":null,
"ShipPostalCode":"1010",
"ShipCountry":"Argentina",
"paid":true,
"OrderDetails":[
{
"OrderID":10409,
"ProductID":14,
"ProductName":"Tofu",
"UnitPrice":18.6000,
"Quantity":12,
"Discount":0
},
{
"OrderID":10409,
"ProductID":21,
"ProductName":"Sir Rodney\u0027s Scones",
"UnitPrice":8.0000,
"Quantity":12,
"Discount":0
}
]
}
]
}
-
Yes it works fine.
Inside the detailModel.init() callback. detail grid data can be accessed as:
var data = ui.rowData.OrderDetails;
//assign to detail grid before initialization of detail grid.
detailGridModel.dataModel.data = data;
-
Thanks so much!
I got it done before reading your reply.
http://teejt.drivehq.com/testing/Visual/Paramquery/Samples/Nested1.html