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
1415
On click of the cell need to make calculations in the grid
posted

Hello Team,

For eg. Grid1 and Grid2 have the following rows,

Grid1
Row1: UnitPrice=x1
Row2: UnitPrice=x2

Grid2
Row1: MinWeight=y1, MaxWeight=z1
Row2: MinWeight=y2, MaxWeight=z2

1. What i want  is:

x = x1 + x2;
x + y1 + z2 has to be 100.
x+ y2 + z1 has to be 100.

Also, when i click on y1/ y2 or change the values of y1 /y2 than z2 and z1 values should change respectively as per above formula. 
y1 always has to be (100 - x - z1)
y2 always has to be (100 - x - z2)

Similarly z1 = 100-x-y2 an z2 = 100-x-y1.

I tried below sample code but it is not giving results as expected. 
Let me know if there is any igx grid cell property that will provide flag when cell is highlighted or i click on that particular cell.

Sample Stackbliz: https://stackblitz.com/edit/angular-grid-add-multi-grids?file=src%2Fapp%2Fgrid%2Fgrid-allData-summary%2Fgrid-allData-summary.component.html

2. Also, In Grid 2, In row1 if y1 > z1 => error msg
Similarly, if y2 > z2 => error msg

Also please provide a working sample stackbliz for point 2 ASAP.

Parents Reply Children
No Data