Update value in parent grid on editing the subgrid value.

Hi,

Is it possible to update value in parent grid on editing the value in subgrid ?

For example as show in snapshot below, I have a parent grid which has a column “Price”, what I need to do is, if I edit the value of price in any row of subgrid it will automatically update the value in price column of parent grid with the sum of price value of all rows of subgrid
I tried it but I am not able to find the Row id of the parent grid which needs to be updated.


Thanks in advance.

Please, try to use onSubgridCreated event:

mygrid.attachEvent("onSubGridCreated",function(subgrid,rId,rInd,data){ subgrid.attachEvent("onEditCell", function(stage,subrId,subcInd,nValue,oValue){ if (stage==2){ mygrid.cells(rId,3).setValue("new value") }; }); return true; });

Thanks a lot… :slight_smile:
This works for me.