Patch to allow GridBatchEditing.deleteRecord to delete rows that fails validation

2 posts, 1 answers
  1. Ashraf Sabry
    Ashraf Sabry avatar
    88 posts
    Member since:
    Jan 2011

    Posted 19 Dec 2013 Link to this post

    As I mentioned before, the GridBatchEditing.deleteRecord triggers the row validators if the row to be deleted is open.
    I didn't find a way around it but to override the default deleteRecord and disable the global validation. Here's the code:
    var origDeleteRecord = batchManager.deleteRecord;
        batchManager.deleteRecord = function (tableView, row)
            var pv = window.Page_Validators;
            window.Page_Validators = null; // HACK:
  , tableView, row);
            window.Page_Validators = pv;

    Where batchManager is a variable obtained from calling get_batchEditingManager, and the rowDeleteing/Deleted are manual events I add to the object to cater for other components.
  2. Answer
    Konstantin Dikov
    Konstantin Dikov avatar
    2126 posts

    Posted 24 Dec 2013 Link to this post

    Hi Ashraf,

    Thank you for sharing your workaround with the community.

    As the Batch edit mode is rather new functionality and it is constantly improved by our developers team, bringing issues or suggestions to our attention is really appreciated. 

    Konstantin Dikov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top