This topic is locked
[SOLVED]

 Add record from Grid A to Grid B

3/28/2020 8:08:31 PM
PHPRunner General questions
A
AlphaBase author

I tried to create a dashboard with two lists. I added a button to an advanced grid. The button won't display - dashboard or no dashboard - period. That's a non-starter right out of the gate.

Secondly, I would need to refresh the 2nd grid after adding the record from Grid A.
This is NOT a master-detail relationship.

Any ideas about:

  • how to add a button to a grid that displays?
  • how to auto refresh grid B after adding the record (which I assume would be to the table, not to the grid itself --?)?

Sergey Kornilov admin 3/29/2020

As a first step, you need to figure out why the button doesn't appear in the regular table. You won't advance far without it. Maybe you inserting it into the wrong place, not enough info to tell. This is definitely not normal.
Then you can write the code for the Server event that gets the current record and inserts a similar record into another table. Then you can just refresh the whole dashboard page. Not ideal but will do the job.
Links:

https://xlinesoft.com/phprunner/docs/button_getcurrentrecord.htm

https://xlinesoft.com/phprunner/docs/db_insert.htm

A
AlphaBase author 3/29/2020

Here is the image of the button. Is there anything wrong with where I put it?


Sergey Kornilov admin 3/29/2020

It works fine me with exactly the same setup.
Just in case try to move it to another column. Also make sure you didn't make any changes to this page in the Editor in HTML mode. If you did - you can reset it there.

A
AlphaBase author 3/29/2020

I guess that's the trick. You have to jigger the columns.

Thanks Sergey.