jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Validation serverside in Grid by PHP
Tagged: angular grid, javascript grid, javascript server validation, jquery grid, jqxgrid, server validation, validation
This topic contains 4 replies, has 2 voices, and was last updated by ivailo 9 years, 1 month ago.
-
Author
-
Dear All,
How to create Build CRUD jqxGrid using PHP and MySQL with Validation serverside ?
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 withcommit(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 IvanovjQWidgets Team
http://www.jqwidgets.comDear 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,
KGDear 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,
KGHi kg,
jqxValidator must be used only for client side validation(validation of the user’s input).
Best Regards,
Ivailo IvanovjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.