ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: rgorantla on September 29, 2014, 08:35:28 pm
-
Hi,
we like the way the tool tip shows upon validation.
Is there a way to just give a warning and accept values(in a tool tip) rather than making it as a required validation and ignore?
I did this as a popup but as per my requirement - they like the way the tooltip shows, so they want it to be a warning in atooltip for few cells.
Appreciate your help.
Thanks,
Roseline
-
Hi,
Could you please tell me if there is any possible way ?
This is an imp feature that needs to be implemented in our project.
Thanks,
Roselien.
-
Please check this demo http://paramquery.com/pro/demos/editing_custom2 for books column
and take note of editorKeyUp event ( implemented to display popup as warning ) and beforeValidate event ( implemented to allow invalid values ).
-
Hi,
It is not working the way i want.
1st time, when you put invalid cell it takes and hit tab it goes to next cell.
But if you come back to this cell again , it wont let you go to another cell unless you enter again something in that cell (ex: books) - it is happening in the demo too in books column ... can we do something for this?
Is there any way to show the warning message when you hover the cell that have invalid values ?
-
That is not supported currently, might be added in the next release.
-
For this to work , i put the warnings in render field - Please see below : But the problem is if we have 1 row which has data and it has been rendered , whenever we click add new row /delete row or anything - alerts are popping up everytime !! I really need this working - Please advise.
render: function (ui) {
//debugger;
var cellData = ui.cellData;
if (cellData != null) {
var value = ui.rowData.contreeplus2;
var ratevalue = ui.rowData.rateeepluschildren;
var celvalue = ui.cellData
if (value > celvalue || ratevalue < celvalue) {
alert("Higher Than expected");
return "<div class= 'yellow'>" + "$" + parseFloat(ui.cellData).toFixed(2) + "</span>";
}
else {
return "$" + parseFloat(ui.cellData).toFixed(2)
}
}
else {
return "";
}
}
Thanks,
Roseline.
-
render callback is called whenever cell, row or whole view is refreshed, so putting an alert in render is not a good idea, it would lead to unwanted alerts.
Probably you could use a jQueryUI tooltip to display warning message by adding a title attribute in the rendered cell.
In the render callback
if validation fails then
return "<div title='validation message'>"+ui.cellData+"</div>";
and in the $(function(){
//add $(document).tooltip();
$(document).tooltip();
});
-
Is there any way to add tootltip like we add class
Ex: $grid.pqGrid("addClass", { rowIndx: rowIndx, dataIndx: dataIndx, cls: 'yellow' });