Hi together,
I want to set default search Parameters on initialiszing grid. I have tried a lot of posible ways, but nothing works. this is my source Code
// Default Value as a php variable
$defaultSuchbegriff = "bachmeier";
// Array to set the search values
$sarr = <<<'END'
{
"groupOp":"AND",
"rules":[
{"field":"suchbegriff","op":"cn","data":$defaultSuchbegriff},
{"field":"benutzername","op":"eq","data":"tom"}
]
}
END;
$grid["search"] = true;
$grid["postData"] = array("filters" => $sarr );
can anybody help me please.
Thank you very much
You code looks fine. More you can do is to edit the demo code (demos/search/search-onload.php) and see the difference.
http://phpgrid.org/demo/demos/search/search-onload.phps