Values in editor input

Values in editor input

klermannklermann Posts: 277Questions: 67Answers: 1

How can I retrieve the value formatted in the input to edit when I open it in modal, currently it is coming [Object Object], It is like this:
fields: [ {
label: "id:",
name: "id"
}, {
label: "Descrição:",
name: "descricaoReceita"
}, {
label: "Data:",
name: "dataReceita",
mRender: function(data){
dataDay = data.dayOfMonth;
dataObj = data.dayOfMonth + '/' + data.monthValue + '/' + data.year
return (dataDay < 10) ? '0' + dataObj : dataObj ;
},
}, {
label: "Contas:",
name: "minhasContas",
mRender: function (data, type, full){
return data[0].nome;
},
sDefaultContent: ''
}, {
label: "Valor:",
name: "valorReceita"
}
]

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,889Questions: 1Answers: 10,530 Site admin

    Editor will always use the draw data. It does not have a rendering function. If you want to edit it in a different format, the data returned from the server would have to be in that format.

    Allan

  • klermannklermann Posts: 277Questions: 67Answers: 1

    Ok, but how do I not show [object object] in the input for a property

  • klermannklermann Posts: 277Questions: 67Answers: 1

    How do I capture the data that is read in the same table in the input? Data of the type [object object] described above?

  • kthorngrenkthorngren Posts: 21,591Questions: 26Answers: 5,004
    Answer ✓

    See if this works:

    {
    label: "Contas:",
    name: "minhasContas[0].nome"
    },
    

    Kevin

  • klermannklermann Posts: 277Questions: 67Answers: 1

    thank so much

This discussion has been closed.