Validation conditional allowNulls

2 posts, 0 answers
  1. Jeffrey
    Jeffrey avatar
    6 posts
    Member since:
    Sep 2016

    Posted 26 Sep Link to this post

    Hello Kendo Spreadsheet Team,

     

    I'm looking for a way to apply validation along this line of thinking:

         "If Cell A1 is null, then A2 is allowed to be null"

         "If Cell A1 is not null, then A2 is not allowed to be null"

    However I have not been able to find an effective way of accomplishing this.  I want to selectively allowNulls depending on whether or not another column (not the one currently being validated) has a value or not.  I cannot seem to accomplish that by simply assigning allowNulls a boolean value:

         Scenario 1: allowNulls=true

                   validation won't run on any of the empty cells so I cannot get the invalid warning marker to indicate the field needs a value conditional on another cell

         Scenario 2: allowNulls=false
                   all blank cells will be marked red regardless of whatever excel logic you put in the 'from:' section. completely empty rows will have their cells be marked as invalid

    Any thoughts on how this can be accomplished?

    Thanks,

    Jeff

  2. Stefan
    Admin
    Stefan avatar
    276 posts

    Posted 28 Sep Link to this post

    Hello Jeffrey,

    The desired validation is not supported out of the box from the Kendo UI Spreadsheet.

    I can suggest using a custom validation that can be evaluated to true or false. Using a custom validation formula for a specific scenario is up to the developer for implementation.

    Please check our demo which is demonstrating how to use a custom validation:

    http://demos.telerik.com/kendo-ui/spreadsheet/validation

    If a custom formula is used which is not working correctly, please send a runnable example and we will investigate it.

    Regards,
    Stefan
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  3. Kendo UI is VS 2017 Ready
Back to Top