Validation conditional allowNulls

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

    Posted 26 Sep 2016 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?



  2. Stefan
    Stefan avatar
    2912 posts

    Posted 28 Sep 2016 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:

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

    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top