I am having some trouble adding the first child row to a webgrid. I believe I have all the pemissions set correctly, however the following line returns null for aRow
var aRow = igtbl_addNew(oGrid, 1);
Alright, got the problem solved, I was using the Grid Object as opposed to the string ID of the grid for the adding, once I changed it I was able to add the rows without an issue
You must have an active row in either the parent band of where you want to add a new row (band 0 in this case), the same band as where you want to add (band 1 in this case), or deeper for this line of code to work. If your active row is in band 0, then your new row is added a child of that row. If your active row is in band 1, your new row is added as a sibling of that row. If your active row is deeper in the hierarchy, the grid will go up to that row's parent, and further, until the parent in band 1 is found, and the new row will be added as a sibling of that existing row.
The active row provides the igtbl_addNew() function with enough context to determine where to put the new row in the specified band. If it doesn't have enough context, no new row is created.
try this.
var aRow = oGrid.Rows.addNew();