I need to add a button to a DataTables column, but "formatValue" does not work in Server Processing. How can I add a button?
I have the following code
`
...
"columns" => array(
"codigo_item" => array("label" => "CODIGO ITEM"),
"nombre_item" => array("label" => "NOMBRE ITEM"),
"numero_serie" => array("label" => "SERIE"),
"tipo_doc_mov_serie_item" => array("label" => "TIPO DOCUMENTO"),
"numero_documento" => array("label" => "NÂș DOCUMENTO"),
"nombre_bodega" => array("label" => "BODEGA"),
"disponibilidad_item_serie" => array("label" => "DISPONIBILIDAD"),
"integridad_item_serie" => array("label" => "INTEGRIDAD"),
"razon_social_cliente" => array("label" => "CLIENTE"),
"razon_social_proveedor" => array("label" => "PROVEEDOR"),
"nombres_usuario" => array("label" => "CREADO POR"),
"fecha_hora_creacion_ultimo_movimiento" => array("label" => "FECHA CREACION"),
"serie_item" => array(
"formatValue" => function ($value) {
return '<a class="btn btn-primary" href="' . url('mostrarItemsFacturaHoy/' . $value) . '" >Detalle</a>';
}
),
),
"serverSide" => true,
...
`
in the view does not show the button