Deleting rows causing null row objects

23 replies. Last post: November 15, 2010 2:55 AM by Yudi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

I have a grid where the user can add and delete rows. Upon adding and deleting I have a javascript function that updates some column footers with the column total. If you only add rows this all works correctly. However as soon as you delete a row, the column footers stop updating because the GetRow() method is returning a null object. Even if you trying adding more rows after you have deleted one, the same error occurs. I have made a sample to illustrate this issue.

Please follow the steps below to reproduce the issue:

1. Add 2 rows to the grid by pressing the add button twice. The column totals should be 2, 2 and 0

2. Delete 1 row. You would expect the column totals to be 1, 1 and 0 but they remain as 2, 2 and 0 because you get the null object javascript error when the totals are recalculated

3. Add another row to the grid and again you get the null object javascript error when the totals are recalculated

Can you please inform on how I can correct this issue?

All times are GMT -5. The time now is 1:23 PM.
Previous Next