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

Text Validation Not working

2 Answers 53 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Adel Chenni
Top achievements
Rank 1
Adel Chenni asked on 12 May 2016, 03:01 PM

If you use the below - r is not passing the valid state

    $("#spreadsheet").kendoSpreadsheet();

    var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");

    var sheet = spreadsheet.activeSheet();

    sheet.range("A1").value("r");
    sheet.range("A1").validation({
        from: "r",
        comparerType: "equalTo",
        dataType: "text",
        messageTemplate: "Not Valid."
    });

2 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 13 May 2016, 12:08 PM
Hello Adel,

Thank you for your report. I confirm this is an issue with the present version of the Kendo UI Spreadsheet.  I have forwarded your report to our developers for fixing. In addition, I have updated your Telerik points for bringing the problem to our attention.


Regards,
Stefan
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Veselin Tsvetanov
Telerik team
answered on 31 Aug 2016, 02:41 PM
Hello Adel,

I would like to update you on the current state of this case.

As we support both formulas and references for the from and to properties, the specified values are always parsed as functions. In order parsing to successfully recognize text value, you will need to double wrap this value in quotes. Therefore, changing the validation rule in the following way should solve the issue observed:
sheet.range("A1").validation({
    from: JSON.stringify("r"),
    comparerType: "equalTo",
    dataType: "text",
    messageTemplate: "Not valid."
});

Regards,
Veselin Tsvetanov
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
Adel Chenni
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Veselin Tsvetanov
Telerik team
Share this question
or