Ordering columns and child tables

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
Virtuon
Posts: 6
Joined: 2015-01-30 09:43

Ordering columns and child tables

Post by Virtuon » 2015-01-30 09:55

Hello there,
I'm pretty new with AppGini and have few questions. I didn't find how to change order of columns and detail tables? They always order by name.

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

Re: Ordering columns and child tables

Post by shasta59 » 2015-01-30 17:50

There is more than one way to do it.

The first one is when you create the fields in AppGini in the order you wish them to be displayed.

Next way is to modify the your_tablename_templateTV.html file

When you open this file you will see:

<!-- Edit this file to change the layout of each record in the table view -->
<!-- To disable clicking of a field, remove the <%%select%%> and <%%endselect%%> formatters around it-->

<!-- If you wish to hide the table view header that contains the column titles, -->
<!-- open the generated 'your_tablename_view.php' file in your text editor and -->
<!-- change the value of $x->ShowTableHeader to 0 -->


When you want to change the detail view open the your_tablename_templateDV.html file and you will see this in the first line.

<!-- Edit this file to change the layout of the detail view form -->

There are other changes you may want to make if you want to revise the size of the columns etc but that is another discussion.

Hope this helps.

On another note I have been working on some code to change the order of the fields displayed on the fly. I have written some test code to allow me, when in the admin view, to pick the order of the fields the TV view displays. (I had a customer who was never satisfied with the order and always wanted one little change - so I just coded the ability to change the order displayed into the admin area and he can go in and play all he wants with the displayed order in the TV view and the width of the column. It displays the field name then you put in a number next to it for what order you want it in and then what size you want it to be. It also prevents putting in the same order number twice.).

Alan
Calgary, Alberta, Canada - Using Appgini 5.50 -

Virtuon
Posts: 6
Joined: 2015-01-30 09:43

Re: Ordering columns and child tables

Post by Virtuon » 2015-02-02 05:21

Thank you Alan! This helps. I have to study the code and help carefully

Virtuon
Posts: 6
Joined: 2015-01-30 09:43

Re: Ordering columns and child tables

Post by Virtuon » 2015-02-03 07:00

I have some new questions about AppGini. Will use this topic.
Now I need to make many to many relation (multiple select). I found multiple select as "option list" part but it seems using for enums. How to make many to many relation as checkbox list or sth similar?

Virtuon
Posts: 6
Joined: 2015-01-30 09:43

Re: Ordering columns and child tables

Post by Virtuon » 2015-02-03 07:23

I forget to say, I did Join table for m2m relation and lookup to parent and child tables and it works, but it's quite not right using join table as child. Would great to have multiselect dropdown or sth like this and display this table as a part of the parent table. Any suggestions?

Post Reply