render sum datatable

render sum datatable

dickynhdickynh Posts: 1Questions: 1Answers: 0

{
data: null, render: function(rowData){
return ( rowData.A + rowData.B )
}
},

Permission to ask questions
I want to add up the data in the row (record), 15 + 2 = 17, but with the above script it becomes 152 (even combines), maybe someone knows the addition operator for rendering datatables, for columns there is no problem, thank you in advance .

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    That's a standard JS issue - just pass your numbers into parseInt(),

    Colin

Sign In or Register to comment.