ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: cosconit on October 14, 2020, 01:53:56 pm

Title: how to add new row with child grid
Post by: cosconit on October 14, 2020, 01:53:56 pm
Hi, I have a nested detail grid that can display the main grid data and the child grid data, but I will not add a new row with the child grid data,initialize the child grid data。

My data are as follows
"groupDtls" is the child grid data
Code: [Select]
{
"uuid": "8bd15218481c48fc895410a2eb7ef4b0",
"dipCgoGrpUuid": null,
"cgoGrpCnnme": null,
"isLimChanged": 0,
"groupDtls": [
{
"recVer": 5,
"svcLoopAbbrv": "IC2",
"dirBound": "S",
"polCde": "PJN",
},{
"recVer": 5,
"svcLoopAbbrv": "IC9",
"dirBound": "N",
"polCde": "NAS",
},

]
}
Title: Re: how to add new row with child grid
Post by: paramvir on October 14, 2020, 05:04:14 pm
Before initialization of nested grid, new row in nested grid can be directly added in groupDtls

Aftere initialization of nested grid, new row in nested grid can be added with addRow method.

https://paramquery.com/pro/api#method-addRow

Code: [Select]
grid.addRow(
    { newRow: {field: value,... } }
);

where grid is instance of detail grid.