jQWidgets Forums

jQuery UI Widgets Forums Grid Validate on Grid

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Validate on Grid #26484

    simcon94
    Participant

    Hello,
    i have a Grid with validation.
    text: “Name “, datafield: “Name”, width: 400,
    validation: function (cell, value) {
    if (value) {
    return true;
    }
    return { result: false, message: “@Resources.Hierarchy.Error_Grid_Name” };
    }
    Thats works, when the cursor leave the Grid Field.
    But i want to show the Validation Message, when i click on a button:

    if ($(‘#grid’).jqxValidator(‘validate’)) {
    …..
    } else {
    SHOW_VALIDATION_MEASSAGE
    }

    Validate on Grid #26485

    Peter Stoev
    Keymaster

    Hi simcon94,

    jqxValidator cannot be used for validating jqxGrid because jqxGrid is not an INPUT widget. You will need to write some custom logic for making such kind of validation. The other option is to use the jqxGrid’s “showvalidationpopup” method for displaying a popup within the Grid.

    Ex:

    $("#jqxGrid").jqxGrid('showvalidationpopup', 0, "firstname", "Invalid Value");

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.