changing select_command not visible effects

Questionschanging select_command not visible effects
Erik Wetering asked 4 years ago

I have a filter combobox on my page above the grid which fills a _POST[filterId].

In the php part I read the filterId from my database and fill my select_command from the grid by using my baseSql added with my predefine filter from the database. Looks like:

$sql = $baseSql.’ where ‘.$filterStr;

$maingrid->select_command = $sql;

$rendergrid = $maingrid->render(‘mygrid’);

<?php        echo $rendergrid;     ?>  

The first time the grid is filled well. But after submit the new selected filter the sql is filled well but the grid still shows the same data.

Is the a re-render function I have to call?

3 Answers
Abu Ghufran Staff answered 4 years ago

POST data need session persistence. For complete details, refer this faq:

How-Tos & FAQs

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Erik answered 4 years ago

Problem isn\\\’t Post data I think. I can add: $_SESSION[\\\”mainsql\\\”] = $sql; but that will nothing change. When I print or echo $sql the value is correct.   $sql = $baseSql.’ where ‘.$filterStr; $_SESSION[\\\”mainsql\\\”] = $sql; $maingrid->select_command = $sql; $rendergrid = $maingrid->render(‘mygrid’); <?php        echo $rendergrid;     ?>

Abu answered 4 years ago

Share complete code that is involved in your question. You can use Github Gist to share code link.

Your Answer

3 + 8 =

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?