RadGrid Batch row mode Validation problem

3 posts, 0 answers
  1. Kyle
    Kyle avatar
    2 posts
    Member since:
    Apr 2016

    Posted 04 Aug 2016 Link to this post

    When I click "add new row", required field validation raises exceptions/constraints one cell at a time. i.e. not allowing the rows data to be entered in any other order / or for the entire row to appear in edit mode.

    behavior reproducible on BatchEditing demo page: http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

    It seems like I would have noticed this before, so maybe it's update related: I have a RadGrid that has Batch Edit row mode enabled.

    Is that intended? Can it be changed with an attribute? if not, how about some client side js? I'll be debugging, but would appreciate an available solution.





  2. Kyle
    Kyle avatar
    2 posts
    Member since:
    Apr 2016

    Posted 04 Aug 2016 in reply to Kyle Link to this post

    Found "solution" by JavaScript debugging. combination of js errors from GridTemplateColumn:DefaultInsertValue not yet being options in dropdown lists(unhandled js exceptions on adding row in Telerik.Web.UI.WebResource.axd) and ColumnValidationSettings attr: RenderValidatorBeforeEditor="false".

  3. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 09 Aug 2016 Link to this post


    The solution you found is proper one and can be used in your scenario.
    Also I am attaching a simple example demonstrating such client-side validation, where you could go through each row, get reference to any of the cells of that row and validate each value. This should be achieved in the client-side OnCommand event of the grid. If the validation fails for any row you could cancel the command, which will prevent the postback.

    Maria Ilieva
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top