Null Column showing object Object?

Null Column showing object Object?

zgoforthzgoforth Posts: 477Questions: 89Answers: 2

Link to test case: https://jsfiddle.net/BeerusDev/wg48rzqa/16/

Why is the third column which I am trying to calculate with columnDef showing the correct calculation but also showing [object Object]

Answers

  • zgoforthzgoforth Posts: 477Questions: 89Answers: 2

    I rendered the columnDef wrong...

    columnDefs: [{
                    "targets": 2,
                    "render": function(data, type, full, meta) {
                        return type === 'display' ? ((full.qty)*(full.price)) + '' : data;
                    }
                }]
    

    Fixed it.

Sign In or Register to comment.