pls how do i set custom column and value?
$col["name"] = "my own value not from database here";
another thing is i want to call a function passing the db column value as follows
$col["name"] = $this->getName('UID');
UID is the column on my db
another thing is how do i get the value from database and store in variable?
I don't understand your query completely, I am answering what i guess the query is.
You can virtual column for custom data in grid, and fill that column using filter_display event.
e.g.
// virtual column to show grid
$col = array();
$col["title"] = "Id";
$col["name"] = "vid";
$col["width"] = "400";
$col["hidden"] = true;
$cols[] = $col;
$e["on_data_display"] = array("filter_display", null, true);
$g->set_events($e);
function filter_display($data)
{
$i=1;
foreach($data["params"] as &$d)
{
$d["vid"] = $i++;
}
}
Events, are supported in full version.
Hello,
This is not working. I want to add a column for Serial Number that having incremented value.
How to do that . Please help.