Good morning,
I have an instance where a new row inserted is not tracked if followed immediately after a row deletion in a RadGrid in batch edit mode.
Process:
1- Add a new row with column named 'AA'
2- Relize I meant to name it 'ZZ' instead. Instead of editing, Delete the newly created row
3- Add the a new row with column named 'ZZ'
Following this process and looking at the results _changes of GridBatchEditing I see a single object is left after I delete the row. The object is -1: "delete".
I performed the same test on the demo site and did not yield the same result.
I'm on the 2013.7.17 version. Was there a bug in the RadGrid regarding this that anyone knows of that has been fixed?
Thanks
6 Answers, 1 is accepted
In order to better portray what I've spoken of above I've created a demo project along with a screen cast of what I am experiencing.
The sample project can be downloaded at:
http://www.palmettosystems.com/src/Demo_Delete_AndAdd.zip
And the video showing the behavior can be viewed at:
http://www.palmettosystems.com/video/RadGrid_Delete_TrackChanges.swf
Thanks
There was a similar issue in an older version of the controls. However, the issue has been fixed and is not observed in the latest release.
I tested the sample project with the latest version and the functionality is working as expected on my end. I also made a short video as reference. You can see it here.
Would you update the controls to the Q1 2015 version and see how the behavior changes?
Regards,
Viktor Tachev
Telerik
See What's Next in App Development. Register for TelerikNEXT.
Good morning Viktor,
Thank you very much for taking the time to respond to my post and for creating the video that you posted.
I was able to apply the latest version of the controls to my isolated test project and see the behavior corrected.
The project I am currently working with utilizes a version of the controls that were modified from the source code and as such cannot be readily upgraded. Would you happen to know the release that the bug was fixed in so that I may attempt to patch our current version of the controls? The version we have on that project is Telerik.Web.UI_2013_2_717.
Thanks so much,
David
The oldest version of the controls where the issue is not observed is 2014.3.1209. You can download it from our site after logging in.
However, I would recommend that you upgrade to the latest official version (currently 2015.1.401) as it includes additional fixes and improvements.
Regards,
Viktor Tachev
Telerik
See What's Next in App Development. Register for TelerikNEXT.
I was able to compare the source of the Grid from the version prior to the version that had the fix and find the changes that were made. I applied those changes to the version of the source I had and was able to verify it resolved my issue. I appreciate your assistance providing direction to the version in which the fix was made. For those reading I would suggest upgrading to the latest version of the controls as there are numerous fixes such as this one included. We have a very complex UI requiring numerous tests and planned upgrade cycles which didn't allow for an upgrade at this time but rather a patch for the bug.
The deleteRecord function in BatchEditing\GridBatchEditing.js was updated in ASP.NET AJAX 2014.3.1209. Previously when a row was deleted the row was updated from the object to text of 'delete.' After a row deletion, however, a row could be added and the newly added row wouldn't be tracked in the changes. This caused the new row not to be saved when the page was saved. The logic in this function was updated to perform checks to only insert 'delete' in certain situations, otherwise remove the object from the changes array.
In addition a new function _deleteRow was added to GridTableView.js as it is utilized by the updated deleteRecord function in GridBatchEditing.
Thank you for sharing your experience and findings with the community. This can be invaluable to someone experiencing similar issues.
Regards,
Viktor Tachev
Telerik
See What's Next in App Development. Register for TelerikNEXT.