This is a migrated thread and some comments may be shown as answers.

Validation conditional allowNulls

1 Answer 232 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Jeffrey
Top achievements
Rank 1
Jeffrey asked on 26 Sep 2016, 07:43 PM

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

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 28 Sep 2016, 12:21 PM
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.
 
Tags
Spreadsheet
Asked by
Jeffrey
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or