ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: pq33user on September 05, 2018, 02:25:37 pm
-
Hi.
When pasting numerical values including ","(Thousand separator), value after "," can not be pasted.
Is there a solution?
Thanks in advance.
e.g.
- Copy 123,456,789
- Move to https://paramquery.com/pro/demos/infinite_scroll (https://paramquery.com/pro/demos/infinite_scroll)
- Paste on any of the column of Revenues.
Only 123 is pasted.[/b]
-
beforePaste event is used for this purpose.
https://paramquery.com/pro/api#event-beforePaste
-
Thank you.
In https://paramquery.com/pro/demos/infinite_scroll (https://paramquery.com/pro/demos/infinite_scroll) it was solved by adding the following code after beforeTableView.
beforePaste: function(evt, ui){
//sanitize pasted data.
var CM = this.getColModel(),
rows = ui.rows,
area = ui.areas[0],
c1 = area.c1;
for(var i=0; i<rows.length; i++){
var row = rows[i];
for(var j=0; j<row.length; j++){
var column = CM[j+c1],
dt = column.dataType;
if( dt == "integer" || dt == "float" ){
row[j] = row[j].replace(/\,/g,"");
}
}
}
}
v3.3.0-3.4.x does not have beforePaste.
Is there an Events that can be used instead?
There was no areas in ui of beforeValidate.
-
Hi.
I decided to upgrade PQGrid used in my project from v3.3.0 to v5.1.0.
Thank you for your support.
-
This board is for evaluation users.
Please share your Pro credentials so that your account can be upgraded.
-
OK.
I confirmed it within the company that I already registered Pro license to another user ID.
Next time I will "Help for ParamQuery Pro" to use Pro license user to ask.