By PipSqueak - Mon Aug 06, 2018 4:34 am
- Mon Aug 06, 2018 4:34 am
#815555
Hi Amos,
How do I make the sum function in grid to work when thousand separator mask is applied? Please see screenshot:
Here is my code:
How do I make the sum function in grid to work when thousand separator mask is applied? Please see screenshot:
Here is my code:
Code: Select all
var gridId = "gridQuotes"; //set to ID of grid
var fieldId = "strCosts"; //set to ID of text field inside grid
//set the thousands separator in all existing rows when the DynaForm loads:
var nRows = $("#"+gridId).getNumberRows()
for (var i = 1; i <= nRows; i++) {
$("[id='form["+gridId+"]["+i+"]["+fieldId+"]']").maskNumber({decimal: '.', thousands: ','});
}
//set the thousands separator in newly added rows:
$("#"+gridId).onAddRow(function(aNewRow, oGrid, rowIndex) {
$("[id='form["+gridId+"]["+i+"]["+fieldId+"]']").maskNumber({decimal: '.', thousands: ','});
});