⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Including two tables in one page



masakiando2003

masakiando2003
  • profile picture
  • Member

Posted 18 November 2013 - 07:09 AM

I want to write a CRUD page looked like the attached picture.

 

My purpose is showing order information with item list in one page (in other words, two tables in one page),

after edit when I press update button it will update both order information and product list information.

 

I tried to search related topics,

/topic/264-join-tables/

set_model() may be the closest solution but there will be a problem if I am using it.

If I update one of the items, it will copy the same information to other items.

 

If it is impossible to include two tables without using set_model() function,

should I use an iframe to separate two tables? (Put Item Information in the iframe)

Or any other method to solve this problem?

 

Thanks for answering my question and sorry for my bad English.

 

 

 


edramirez

edramirez
  • profile picture
  • Member

Posted 19 November 2013 - 15:17 PM

Let me summarize your two issues:

(1) you want to place two tables (or rather tabular views) in one screen view

(2) you want some kind of synchronization, such that when one table is updated, another is updated.

 

Here are some ideas:

 

First, you can only put one and only one grocerycrud operation into one controller. GroceryCrud uses the URL for its functionality. You will run into problems if you try to put two grocerycrud operations into one controller.

 

Second, when updating a table through grocerycrud, you can subsequently update another table. That's no problem as long as you don't require that an update would synchronize its view into the other view.

 

Hope this helps!

 

Ed Ramirez

 

P.S. Don't forget to click the Like button.