ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: pq33user on April 23, 2018, 11:03:39 am
-
Hi
Even if you input a space at beginning of the cell, space is deleted when you complete the input.
Is it possible to not delete the space?
Thanks in advance.
-
Input is always trimmed.
Please add text-align or text-indent css styles to the cells for stated purpose.
-
Thank you.
I would like to register the inputed space in the database, so I will consider another plan.
-
you can use cellBeforeSave event to get raw value ( including empty spaces at boundaries ) in an editor : https://paramquery.com/pro/api#event-cellBeforeSave
cellBeforeSave: function(evt, ui){
var newVal = ui.newVal;
alert(newVal);
},
-
Thank you.
By setting the value of ui.newVal to ui.rowdata in the cellSave, it was possible to set the value to include the space.
However, it is trimmed on display.
Is it possible to make the same value on display?
cellSave: function (evt, ui) {
ui.rowData[ui.dataIndx] = ui.newVal;
}
-
The problem was resolved by replacing space with " " in the colModel's render event.
Thank you, you've been so helpful.
render: function (ui) {
return { text: ui.cellData.replace(/\s/g, " ") }
}