How come when I use the following column it only displays No2 and never displays Yes2?
The column contans rows that have Yes and No as values. But when I filter for Yes it displays No2 in the cell.
//Driveable
$col = array();
$col[“title”] = “Driveable”; // caption of column, can use HTML tags too
$col[“name”] = “driveable”; // grid column name, same as db field or alias from sql
$col[“dbname”] = “st.driveable”;
$col[“condition”] = array(‘$row[“st.driveable”] <> “No”‘, “No2″,”Yes2”);
$col[“search”] = true;
$col[“export”] = true;
$col[“stype”] = “select”;
$col[“searchoptions”] = array(“defaultValue”=>”,”value” => “:All;Yes:Yes;No:No”, “separator” => “:”, “delimiter” => “;”);
$cols[] = $col;
Are you still supporting this software?
Your condition statement breaks things. Please assist. I am now trying to use a condition on a field with a checkbox for add and edit and it breaks the checkbox.
//NOCALL
$col = array();
$col[“title”] = “No Call”; // caption of column, can use HTML tags too
$col[“name”] = “nocall”; // grid column name, same as db field or alias from sql
$col[“dbname”] = “nocall”; // grid column name, same as db field or alias from sql
$col[“show”] = array(“list”=>true, “add”=>true, “edit”=>true, “view”=>false, “bulkedit”=>false);
$col[“formatter”];
$col[“editable”] = true;
$col[“edittype”] = “checkbox”;
$col[“editoptions”] = array(“value”=>”1:0”);
$col[“hidden”] = false;
$col[“hidedlg”] = true;
$col[“export”] = false;
$col[“condition”] = array(‘$row[“nocall”] > 0’, “No Call”, “Called In”);
$cols[] = $col;
Hi,
I don’t understand your issue. I think your code is working as you wrote it. You put the condition that if the value of cell is not “No” (that also includes Yes) … show No2 and it is doing it.
I see another issue in it, instead of $row[st.driveable] it should be $row[driveable]. The dbname property is only used in filtering and sorting to solve ambiguity in sql query.
$col["condition"] = array('$row["driveable"] <> "No"', "No2","Yes2");
If you still think it’s unexpected, please explain little more.
PS: Yes, technical support is still there but customers with active subscriptions have priority.