Remove a grid row based on the selection in another grid

I have a grid and in that grid I have a check box entitled "is ad-sales specific".  If the user checks that box then it exposes a row in another grid for the user to add additional information.  These 2 rows should now be "connected" so if the user unchecks that checkbox then the corresponding row in the other grid should be removed.  The challenge is that the first grid may have 5 rows and say row 1, 4, 5 have the ad-sales box checked.  This would generate another grid below that would have 3 rows of info.  The first row would pertain to row 1 in the first grid, 2nd row would pertain to row 4 in first grid and the 3rd row would pertain to row 5 in the first grid.  If I uncheck the check box in row 4 then I need to remove row 2 in the second grid.  

I tried using the index of each row but once you remove a row from the second grid the index is reset so now the rows are out of sync.  Any idea how I can accmplish what I need to do above?

 

Thanks!

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data