Complex validation in Grid

4 posts, 0 answers
  1. Bilal
    Bilal avatar
    109 posts
    Member since:
    Oct 2014

    Posted 03 Mar 2015 Link to this post

    Hi,

    I have the following grid / columns

    Left-Operand     Left-Operator     Value      Right-Operator      Right-Operand
                                                            x                    >                            D
            C                       <=                  x                    <=                          D
            B                       <=                  x                     <                           C
            A                       <=                  x                     <                           B
                                                            x                     <                           A

    The user needs to fill in the values for A, B, C and D. In such a way that D > C > B > A.

    I am using a editable grid with only Left and Right Operands editable, the rest is read only.

    How could I enforce such a validation while the user is editing the values?

    Thanks 
      
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 05 Mar 2015 Link to this post

    Hi Bilal,

    Kendo UI Validator do not have a build-in validation rule like the one you described. You may consider using custom validation rule.

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Bilal
    Bilal avatar
    109 posts
    Member since:
    Oct 2014

    Posted 06 Mar 2015 in reply to Alexander Valchev Link to this post

    Thanks. Can you at least guide me on how to approach such a validation using either a Grid or no grid? 
  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 10 Mar 2015 Link to this post

    Hi Bilal,

    In terms of Kendo UI you should know that the custom validation rule is evaluated for each input in the validated form. In order to mark the validation as successful, the custom validation rule should return true. In order to mark the validation as failed, the custom validation rule should return false.

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready