Sheet validation, not sure how to set this up properly

3 posts, 0 answers
  1. Steve
    Steve avatar
    1885 posts
    Member since:
    Dec 2008

    Posted 10 May Link to this post

    So I need my spreadsheet to have a header row, and every row below be where the data is entered... so I've got that setup fine I think.

    Now I need to define validation rules on ranges, so like K2:K40 can only have 1-5... I was able to do this in the widgetCreated event

                    type: "warning",
                    from: "1",
                    to: "5",
                    allowNulls: true,
                    comparerType: "between",
                    dataType: "number",
                    messageTemplate: "PGYs are 1-5"


    My current struggle though is being able to find out the total validation errors in the sheet... the code provided here

    and here

    Always fails, the "cell.validation" in range.forEachCell is always undefined... what am I doing wrong here?


  2. Steve
    Steve avatar
    1885 posts
    Member since:
    Dec 2008

    Posted 10 May in reply to Steve Link to this post

    Scratch that, found the problem, this is setup correct, it's just $scope isn't available in the change event...eugh
  3. Joana
    Joana avatar
    178 posts

    Posted 14 May Link to this post

    Hi Steve,

    I am glad that you managed to pin down the cause of the issue.

    In the change event of the SpreadSheet widget you could take reference of the scope as follows:

    change: function (e) {

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top