jQWidgets Forums

jQuery UI Widgets Forums Grid server side validation in jqxgrid editing

This topic contains 2 replies, has 2 voices, and was last updated by  Venu Gopal 11 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • server side validation in jqxgrid editing #30902

    Venu Gopal
    Participant

    i want to validate an entry while editing jqxgrid column with list of values which are in a database table. user should only be allowed to save only those values. i can’t use a dropdownbox as the list is of large size. if user enters any value which is not in the list a validation error should be thrown.

    my code looks like:

    $(“#jqxgrid”).jqxGrid(
    {      selectionmode: ‘multiplecellsadvanced’,

    columns: [

    { text: ‘Delay Code’,datafield: ‘delay_det_code’, width: 110,editable:true,
    validation: function (cell, value) {

    var valid = isValidCode(value);
    if(valid == -1){
    return { result: false, message: “Enter valid delay code” };
    }else { return true; }

    }

    }

    in the above validation rule, there is a function isValidCode() which inturn makes an ajax call which returns a boolean.

    this is not working as isValidCode() is making a server call.

    server side validation in jqxgrid editing #30925

    Peter Stoev
    Keymaster

    Hi Venu Gopal,

    When you make Ajax calls for validation, set the Ajax function’s async to false.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    server side validation in jqxgrid editing #30928

    Venu Gopal
    Participant

    Thank you

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

You must be logged in to reply to this topic.