Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
650
Adding child row to a web-grid with javascript
posted

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); 

Parents
  • 45049
    posted

    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.

Reply Children
No Data