Hi Abu, I know that the following will set a default filter, but how can I set the value of the drop select box on that column to match on load?
$sarr = <<< SEARCH_JSON
{
“groupOp”:”AND”,
“rules”:[
{“field”:”status”,”op”:”eq”,”data”:”Active”}
]
}
SEARCH_JSON;
You can set:
$col["searchoptions"] = array("defaultValue"=>'Active');
For some reason that doesn’t seem to work with:
//STATUS
$col = array();
$col[“title”] = “Status”; // caption of column, can use HTML tags too
$col[“name”] = “status”; // grid column name, same as db field or alias from sql
$col[“editable”] = false;
array(“list”=>true, “add”=>true, “edit”=>true, “view”=>true, “bulkedit”=>false);
$col[“stype”] = “select”;
$col[“searchoptions”] = array(“defaultValue”=>’Active’);
$col[“searchoptions”] = array(“value” => “:ALL;Inactive:Inactive;Active:Active;Terminated:Terminated”, “separator” => “:”, “delimiter” => “;”);
$cols[] = $col;