virtual column

Questionsvirtual column
Chao Shun Jenq asked 6 years ago

Hi,Abu,

// virtual column
$col = array();
$col["title"] = "Col2";
$col["name"] = "col2-virtual";
$col["width"] = "200";
$col["editable"] = false;
$col["hidden"] = false;
$col["default"] = "{col2}";
$cols[] = $col;

"{col2}" can be set to "{col2}-{col3}" ?

Rgds,

1 Answers
Abu Ghufran answered 6 years ago

You can use custom callback for display your desired changes.

$col["on_data_display"] = array("do_maths","");

function do_maths($data)
{
return $data["col2"] – $col["col3"];
}

$col["default"] should be removed when using this.

Your Answer

8 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!