$_GET[“sigid”] is default value.
I want to default filter for select column. My code is;
$col = array();
$col[“title”] = fnp_chef_lang(‘Belge No’);
$col[“name”] = “stock_in_group_id”;
$col[“dbname”] = “sig.id”;
$col[“width”] = “50”;
$col[“show”][“list”] = true;
$col[“show”][“view”] = true;
$col[“editable”] = true;
$col[“search”] = true;
$col[“edittype”] = “lookup”;
$col[“editoptions”] = array(“table”=>”stock_in_group”, “id”=>”id”, “label”=>”invoice_number”);
$col[“searchoptions”] = array(“defaultValue”=>$_GET[“sigid”]);
$cols[] = $col;
In addition to this, You will need to set postData when grid loads. Refer this code:
https://www.gridphp.com/demo/demos/search/search-onload.phps#L.36-64
Demo: https://www.gridphp.com/demo/demos/search/search-onload.php