ParamQuery grid support forum

General Category => ParamQuery Pro Evaluation Support => Topic started by: rallesaid on September 08, 2016, 12:10:12 am

Title: Validation alert
Post by: rallesaid on September 08, 2016, 12:10:12 am
It is possible that instead of the tooltip "required",
(https://s16.postimg.io/sxgkbecmt/Screenshot_2.png)

an alert "required" is displayed
(https://s16.postimg.io/yzo71w12t/Screenshot_3.png)
Title: Re: Validation alert
Post by: paramvir on September 09, 2016, 08:58:43 pm
Alert can be shown in validation callback.
Title: Re: Validation alert
Post by: rallesaid on September 09, 2016, 09:31:06 pm
I resolve with this
//maxLen
{ type:function(ui){
                var value = ui.value;
                if(value.length > 50 ){
                    alert('some message');
                    return false;
                }
            }
        }

but I have other question.
when I put return false, the entered value is cleared, then I comment the line  //return false,the entered value remains in the cell but the alert is displayed 2 times,
how i can remain the entered value and return false?