denny.ardian20286
denny.ardian20286

hi, i have 4 column on datatable widget [items, qty, price, subtotal]. i want to automatic calculated on subtotal column with parameter on keydown price column will automatic calculated qty*price. How to make it work on datatable widget ? i try to read the documentation and try to using namespace function $.oc.table.table.setCellValue. it always return "is not a function".

thanks for response.

guillaume.batier2373
guillaume.batier2373

I've the same issue, if some have an idea...

guillaume.batier2373
guillaume.batier2373

I've found a solution:

i've made a partial who calculated my fields, and when the relation is refreshed it's updated.

 public function relationExtendRefreshResults($field)
    {
        if ($field != 'fields')
            return;

        $model = $this->formGetModel();
        return [
            '#total_ht' => $model->getTotalFields()
        ];
    }

you can use this method in your controller and it works fine !

1-3 of 3