Rangevalidation GridNumericColumn in EditMode="Batch"

3 posts, 0 answers
  1. Sébastien
    Sébastien avatar
    12 posts
    Member since:
    Apr 2016

    Posted 26 Jul Link to this post


    Using the RadGrid in Batch Editing mode and the EditType is set to row.

    What is the best way to implement a RangeValidation for a GridNumericColumn ? I 

    I just want the user having to enter a value between 1 and 999. If this is not the case, a small message indicates the error.

    Thanks in advance to show me the way :)


  2. Konstantin Dikov
    Konstantin Dikov avatar
    1756 posts

    Posted 29 Jul Link to this post


    The easiest way for achieving the desired result is by setting the MinValue and MaxValue properties of the GridNumericColumn, which will automatically enable the range validation:
        <telerik:GridNumericColumn DataField="Age" MinValue="0" MaxValue="100"></telerik:GridNumericColumn>

    As for displaying error message, this could be achieved with custom validator control. You can refer to the following demo, where you will see how RequiredFieldValidator is used, but in your case you will need CustomValidator:

    Best Regards,
    Konstantin Dikov
    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.
  3. Telerik UI for ASP.NET Core is out
  4. Sébastien
    Sébastien avatar
    12 posts
    Member since:
    Apr 2016

    Posted 29 Jul in reply to Konstantin Dikov Link to this post


    Thank you for your reply.

    Ok, I will do so.

    Best Regards,


Back to Top