Use a space where * you want to insert a non-database field (for example a counter or static image
Use a space where * you want to insert a non-database field (for example a counter or static image
rbigliazzi
Posts: 7Questions: 0Answers: 0
Hello friends, I wonder if anyone know how to insert the array fields that are not in the databases table. Thanks
This discussion has been closed.
Replies
Allan
Renato
Thanks Allan
Allan , you can a example for a situation below ?
Example column 1 - name (database) column 2 (non database) column 3 (database) column 4 (non database) column 5 (non database).
Thanks
mRender using derived data: http://datatables.net/release-datatables/examples/advanced_init/column_render.html
sDefaultContent : http://editor.datatables.net/release/DataTables/extras/Editor/examples/inlineControls.html
DataTables init
$('#example').dataTable( {
"sDom": "Tfrtip",
"sAjaxSource": "php/browsers.php",
"aoColumns": [
{ "mData": "browser" }, THAT DATABASE FIELD CORRECT
{ "mData": "engine" }, THAT DATABASE FIELD CORRECT
{ "mData": "platform" }, THAT DATABASE FIELD CORRECT
{ "mData": "grade", "sClass": "center" }, THAT DATABASE FIELD CORRECT
{
"mData": null,
"sClass": "center",
"sDefaultContent": 'Edit / Delete' THAT IS NON DATABASE FIELD CORRECT ?
}
]
} );
} );
thanks
"aColumns": [
{ "mData": "rastreamento" },
{ "mData": "null" },
{ "mData": "null" },
{ "mData": "null" },
{ "mData": "tipo_envio" },
{ "mData": "null" },
{ "mData": "nomedestinatario" },
{ "mData": "pedidooudanfe" },
{ "mData": "null" },
{ "mData": "null" },
]