jQWidgets Forums

jQuery UI Widgets Forums Grid Validation serverside in Grid by PHP

This topic contains 4 replies, has 2 voices, and was last updated by  ivailo 9 years, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Validation serverside in Grid by PHP #81501

    kg
    Participant

    Dear All,

    How to create Build CRUD jqxGrid using PHP and MySQL with Validation serverside ?

    Validation serverside in Grid by PHP #81506

    ivailo
    Participant

    Hi kg,

    Here is the documentation about jqxGrid CRUD.
    If you want additional server validation, you can check the variables, received from the server. If they are not with acceptable you can trigger error.
    For example:
    trigger_error("Invalid values", E_USER_ERROR);
    When an error is occurred, the widget executes an error callback with commit(false); and/or some other additional logic.
    So you can add some actions, for the users like validation error information.
    On commit(false) changes of your grid are declined.

    For example here is the code of addrow callback:

    addrow: function (rowid, rowdata, position, commit) {
        // synchronize with the server - send insert command
    	var data = "insert=true&" + $.param(rowdata);
    		$.ajax({
                dataType: 'json',
                url: 'data.php',
                data: data,
    			cache: false,
                success: function (data, status, xhr) {
    				// insert command is executed.
    				commit(true);
    			},
    			error: function(jqXHR, textStatus, errorThrown)
    			{
    				commit(false);
    			}
    		});							
    },

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    Validation serverside in Grid by PHP #81573

    kg
    Participant

    Dear Ivailo Ivanov,

    Thank you very much for you reply.

    I’m first time learning JQuery.
    How to use jqxGrid CRUD with jqxValidator (jqxValidator using PHP Mysql)

    e.g. Student input StudentID in jqxGrid CRUD, then jqxValidator will checking MYSQL TABLE StudentID exist or not. If StudentID not exist, show msg “StudentID NOT EXIST!” from jqxGrid CRUD field.

    Please HELP!

    Best Regards,
    KG

    Validation serverside in Grid by PHP #81574

    kg
    Participant

    Dear Ivailo Ivanov,
    Thank you very much for you reply.
    I’m first time learning JQuery.
    How to use jqxGrid CRUD with jqxValidator (jqxValidator using PHP Mysql)
    e.g. Student input StudentID in jqxGrid CRUD, then jqxValidator will checking MYSQL TABLE StudentID exist or not. If StudentID not exist, show msg “StudentID NOT EXIST!” from jqxGrid CRUD field.
    Please HELP!

    Best Regards,
    KG

    Validation serverside in Grid by PHP #81579

    ivailo
    Participant

    Hi kg,

    jqxValidator must be used only for client side validation(validation of the user’s input).

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.