Hi,
I have the gtid almost behaving the way I would like it to. What I am missing is a way to validate data when it is entered in the cell and also a robust way to validate a succesfull entry into my db. for this I have two questions:
1. Is it possible to integrate a validation plugin (e.g. jquery.validator.js) with jqGrid? I need to check for digits, ranges of numbers etc.
2. I try to use an exit function to check for success after a db update. For this I do some serverside error checking an dreturn a string with “Saved” after a succesfull row update. The prblem I have is that this function is fired as soon as I select a row and (off course) returns the error. Can you give me a tip on how to handle this?
My onSelectRow:
onSelectRow: function(id){
if(id && id!==lastsel){
jQuery(‘#rowpain’).saveRow(lastsel,checksave);
jQuery(‘#rowpain’).editRow(id,true,checksave);
lastsel=id;
}
},
My checksave function:
function checksave(result) {
if (result==”Saved” || result==””)
{
return true;
}
else
{
alert(“Update error!”);
return false;
My datapage returns an “echo ‘Saved'” after a db update.
Regards,
W.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top