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
335
Change Parent cell based on child
posted

When a row is updated in the child container it subtracts that amount from the total amount in the parent row. I accomplished this by getting the numbers subtracting them and then setting the parent cell. It shows up perfectly but doesn't commit back to the database. If I postback that information is lost. How do I update the database with the new value?

var amount = eventArgs._cells[4]._old;

var newamount = eventArgs._cells[4]._val;

var parentindex = sender._parentRow._index

var grid = ig_controls["WebHierarchicalDataGrid1"].get_gridView();

var parentvalue = grid.get_rows().get_row(parentindex).get_cell(5).get_value()

var total = parentvalue-(newamount - amount);

grid.get_rows().get_row(parentindex).get_cell(5).set_value(total);