I am trying to pass the values obtained from the URL to the add/edit mode of the grid.
In detail:Say this is my URL(WWW.xzy.com/hello.php?id=1&name=Dell).
i want to pass this id and name into some column,when i open in add/edit mode of the new page with the above URL.
How to pass it, i am trying to copy it to local variable,is it possible to set grid column values to local variable?
You can simply set this value in column using following config.
$col["name"] = "pc_name";
$col["editoptions"] = array("defaultValue" => $_GET["name"]);
defaultValue only comes when adding. If you want same value at edit, you need to set "value" instead of "defaultValue"
is it possible to do the same with a query?
The result should be as if I sarch in column "name" the term "queryterm"
Is it possible to pre-filter a grid by an url-parameter? Or do I have to set up for each case an own file with own select?
This feature is available in latest build.
Usage: Add querystring param, gridid_colname=value e.g. list1_name=ana
Kindly email me your order number for updated build.
I thank you. It works great! It works according this pattern
One has to combine
p.e. list1 = which is the name in the grid-output, mostly last line, like …
$out = $g->render("list1");
… with the colfieldname
p.e. "colfieldname" = which is the name of the column.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?