Editor mRender equivalence

Editor mRender equivalence

jfrjfr Posts: 71Questions: 24Answers: 0
edited June 2013 in Editor
Hi all
I use a number formatter to display and validate number and I use mRender in oaColumns datatable
is there and equivalence in Editor

[code]
jquery.numberformatter-1.2.3.js
"fields": [{
"label": "$ Sales:",
"name": "CVSALES",
"attr": {"maxlength": 12},
"mRender": function( iIn ) {
return ("$"+jQuery.formatNumber(iIn, {format:"#,###.00-", locale:"ca"}))}
}][/code]

Replies

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin
    Not really actually - it is assumed that generally Editor will be working with the raw data. Having said that you can use the dataProp option ( https://editor.datatables.net/fields/#dataProp ) as a function, just like how mData as a function work, so that might be an option for it. Note that unlike mRender dataProp (like mData) can be both a getter and a setter.

    Regards,
    Allan
This discussion has been closed.