Rows visible in Table View
-
- Posts: 9
- Joined: 2015-02-04 19:54
Rows visible in Table View
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?
Re: Rows visible in Table View
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:
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
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;
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 -