passing variable from URL in add/edit mode

Questionspassing variable from URL in add/edit mode
varun asked 10 years ago

Hi Abu,
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(
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?

5 Answers
Abu Ghufran answered 10 years ago


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"

varun answered 10 years ago

thank you

Mario answered 7 years ago


is it possible to do the same with a query?
For instance

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?

Best regards,

Abu Ghufran answered 7 years ago

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.

Mario answered 7 years ago

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.

Your Answer

13 + 13 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?