subgrid parameter fetch

Questionssubgrid parameter fetch
Giovanni Luca Bonelli asked 10 years ago

I have a problem with a grid and and its sub_grid.
In the master grid code, I post one parameter:
$grid["subgridparams"] = "par";
In the sub_grid I fetch the parameter:
$ord=$_POST["par"];
and then I use it for the sub_grid caption:
$grid["caption"] = $ord;
IT WORK FINE! The subgrid caption show posted parameter.

When I use the same parameter to set files upload directory
$col["upload_dir"] ="upload/".$ord."/".$nu."/rap"; // upload here
IT DOESN'T WORK!
Upload directory became: "upload/"."/".$nu."/rap".
The variable $ord that contains fetched parameter is ignored while the other one $nu who contains a $_SESSION information is correctly used.

I don't understand why this behavior!
Please help me.
Tank You

4 Answers
Abu Ghufran answered 10 years ago

Please replace $_POST with $_REQUEST.

Giovanni Luca Bonelli answered 10 years ago

It doesn't work! Same problem like $_POST 🙁

Abu Ghufran answered 10 years ago

You can try preserving that POST data in session and then use in grid config.

e.g.

if (!empty($_POST["company"]))
$_SESSION["company"] = $_POST['company'];
$company = $_SESSION['company'];

Giovanni Luca Bonelli answered 10 years ago

Very strange, but it works.
Thank you!

Your Answer

12 + 2 =

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?