Rows visible in Table View

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
pdweinberg
Posts: 9
Joined: 2015-02-04 19:54

Rows visible in Table View

Post by pdweinberg » 2015-02-09 23:50

I am showing the table view and detail views on the same page. I want to limit the number of rows that are displayed in Table View to 5 rows. How do I do this?

User avatar
shasta59
AppGini Super Hero
AppGini Super Hero
Posts: 231
Joined: 2013-01-08 19:40
Location: Calgary, Alberta, Canada

Re: Rows visible in Table View

Post by shasta59 » 2015-02-10 01:15

That is really easy. There is a value you set when you create the app in AppGini and create the tables. If you select one of your tables and look to the left of it when in appgini it will say "Records per page".

Now if you have already generated the app you can also set it in:

your_tablename_view.php. Look for the following:

Code: Select all

$x->RecordsPerPage = 10;
Then change the number to whatever you wish. In one of my apps I do this in the admin section. I have written code which shows me the settings for each table and I can change them that way. (This was a request by a client).

I also have played with letting the user also set this in their preferences section. It works either way. In the admin section there is an override feature. You tell it to override any setting the user makes. It then puts up a message in the user prefs area telling them this.

Alan
Calgary, Alberta, Canada - Using Appgini 5.50 -

Post Reply