updating rows on two different datatables at once
updating rows on two different datatables at once
Okay, I have two tables. The first is the grandparents table. It has three columns, two visible (V)
grandparentid | grandparentname(V) | noofgrandchildren(V)
The second table, to the right of it, has has four columns, three visible (V)
actions(V) | parentid | parentname(V) | noofchildren(V)
In the second tables action column is a "edit" image that pops up an edit window to the parent where I can change the number of children.
When I do this I update the parent record in the datatable. BUT I also need to update the grandparent datatable record for that grandparent with the new number of grandchildren.
Now I have the aPos for the datatable that I was editing (parent datatable), but I don't know how to get the aPos for the grandparent datatable for that grandparents row so I can update that row as well.
Has anyone run into a solution that would allow me to get the aPos for the gpTable so I can issue an fnUpdate for that tablerow?
Thank you in advance for the time.
(the code I used to do fnUpdate was the example code from the site. The aPos is from
var nTr = $(this).closest("tr").get(0);
window.aPos = pTable.fnGetPosition( nTr );
the update is:
dTable.fnUpdate(rows,aPos,0,0);
)
jmi
grandparentid | grandparentname(V) | noofgrandchildren(V)
The second table, to the right of it, has has four columns, three visible (V)
actions(V) | parentid | parentname(V) | noofchildren(V)
In the second tables action column is a "edit" image that pops up an edit window to the parent where I can change the number of children.
When I do this I update the parent record in the datatable. BUT I also need to update the grandparent datatable record for that grandparent with the new number of grandchildren.
Now I have the aPos for the datatable that I was editing (parent datatable), but I don't know how to get the aPos for the grandparent datatable for that grandparents row so I can update that row as well.
Has anyone run into a solution that would allow me to get the aPos for the gpTable so I can issue an fnUpdate for that tablerow?
Thank you in advance for the time.
(the code I used to do fnUpdate was the example code from the site. The aPos is from
var nTr = $(this).closest("tr").get(0);
window.aPos = pTable.fnGetPosition( nTr );
the update is:
dTable.fnUpdate(rows,aPos,0,0);
)
jmi
This discussion has been closed.
Replies