1
Help for ParamQuery Pro / Re: Passive Validation
« on: December 11, 2013, 01:20:16 am »
Thank you for the suggested solutions for my problem. In trying the first solution, I'm at the point where I can see that the 'saveEditCell' function is being invoked but nothing is happening. I then tried to invoke the 'isValid' method using the cell index and had a modicum of success; although I'm seeing the wrong validation message and when I attempt to correct the error I still get the error message. I am going to try second solution.
Here is the colModel variable I am using with included validations. Would you be able to tell me if this is valid? Thank you again.
newObj.colModel = [
{ title: 'Category', width: 390, dataIndx: 'category', resizable: false, editable:false, },
{ title: 'Job Weight', width: 90, dataIndx: 'jobWt', resizable: false, dataType: 'float', align:'center',
validations: [
{ type: 'minLen', value: 1, msg: 'Required'},
{ type: 'gte', value: 1, msg: 'key value between 1.00 and 99.99'},
{ type: 'lt', value: 100, msg: 'key value between 1.00 - 99.99'}
] },
{ title: 'Rating', width: 80, dataIndx: 'rating', resizable: false, dataType: 'float', align:'center',
validations: [
{ type: 'minLen', value: 1, msg: 'Required'},
{ type: 'gte', value: 1, msg: 'key value between 1.00 and 4.00'},
{ type: 'lte', value: 4, msg: 'key value bewteen 1.00 and 4.00'}
] },
{ title: 'Points', width: 90, dataIndx: 'points', resizable: false, dataType: 'integer', editable:false, align:'center' }
];
Here is the colModel variable I am using with included validations. Would you be able to tell me if this is valid? Thank you again.
newObj.colModel = [
{ title: 'Category', width: 390, dataIndx: 'category', resizable: false, editable:false, },
{ title: 'Job Weight', width: 90, dataIndx: 'jobWt', resizable: false, dataType: 'float', align:'center',
validations: [
{ type: 'minLen', value: 1, msg: 'Required'},
{ type: 'gte', value: 1, msg: 'key value between 1.00 and 99.99'},
{ type: 'lt', value: 100, msg: 'key value between 1.00 - 99.99'}
] },
{ title: 'Rating', width: 80, dataIndx: 'rating', resizable: false, dataType: 'float', align:'center',
validations: [
{ type: 'minLen', value: 1, msg: 'Required'},
{ type: 'gte', value: 1, msg: 'key value between 1.00 and 4.00'},
{ type: 'lte', value: 4, msg: 'key value bewteen 1.00 and 4.00'}
] },
{ title: 'Points', width: 90, dataIndx: 'points', resizable: false, dataType: 'integer', editable:false, align:'center' }
];