Hi @JDodd,
maybe you can try this
https://discuss.grocerycrud.com/t/create-conditional-rules-per-row-on-the-grid/1091/2
regards,
dodo
Hi @johnny,
Thank you for your respons, I try your example but still not working, except I add the “display:block” in “style” like this ::
$crud->callbackColumn('credit', function ($value) {
if (!empty($value)) return "<span style=\"text-align:right;display:block;width:100px;\">".($value < 0 ? n…
Hi @johnny and @all,
please help how to set content of column to align right …
I have tried like this but it doesn’t work
$crud->callbackColumn('amount', function ($value) {
if (!empty($value)) return "<span style=\"text-align:right\">".$value."</span>";
});
Thank you in advance
dodo
hello @nasrul
$crud->callbackColumn('tanggal_pembelian', function ($value, $row) {
if (!empty($value)) return convertYmdToDmy($row->tanggal_pembelian);
});
my helper function ::
if (! function_exists('convertYmdToDmy')) {
function convertYmdToDmy($date)
{
retur…
$crud->setRelation(‘user_id’, ‘presensi_emp’, ‘nama’,“presensi_emp.user_id in (‘152’,‘69’)”);
maybe you miss a bracket,
maybe become like this
$crud->setRelation(
'user_id',
'presensi_emp',
'nama',
['`presensi_emp.user_id` in ?' => '("152","69")']
);
hope this help
regards,
dodo