Customized Table View

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
uchhavi
Veteran Member
Posts: 80
Joined: 2018-05-15 14:07

Customized Table View

Post by uchhavi » 2018-05-21 06:00

Hello,

How can I make a customized table detailed view.

Please Can you help.

Best regards,

Chhavi
Best regards,

Chhavi Jain

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Customized Table View

Post by pbottcher » 2018-05-21 07:26

Hi,
can you please explain a little bit in more detail what you try to acheive.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

uchhavi
Veteran Member
Posts: 80
Joined: 2018-05-15 14:07

Re: Customized Table View

Post by uchhavi » 2018-05-21 08:37

Hi,
Please find attached the file.
This is my ultimate goal with the table view.
Please let me know what all functionality is possible and how i can achieve it

So 2 things:
a) The customised display of the table fields
b) Whether I can store the notes/ action in a history field along with Date/Time Stamp and PIC.

Please help
Best regards,

Chhavi Jain

uchhavi
Veteran Member
Posts: 80
Joined: 2018-05-15 14:07

Re: Customized Table View

Post by uchhavi » 2018-05-21 10:43

Not able to attach the file..

Please refer to the DB link: https://www.dropbox.com/s/xgrw7z8nzw8c3 ... e.pdf?dl=0
Best regards,

Chhavi Jain

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Customized Table View

Post by pbottcher » 2018-05-22 10:41

Hi,

this can mainly be done.

1, you can split the DV into two columns by adding the following code into the hooks/<tablename>.php -> <tablename>_dv function

Code: Select all

		if(isset($_REQUEST['dvprint_x'])) return;		
		ob_start(); ?>
		
		<script>

			$j(function(){
				$j('fieldset.form-horizontal').removeClass('form-horizontal').addClass('form-inline').css({ 'min-width': 'unset', 'width': 'unset' });
		})
		</script>
		
		<style>
			@media (min-width: 768px){
                .form-inline .form-control  {  
					 width: 95%; /* !important; */ 
				}                   /*end new code*/
                .form-inline .form-control-static {
                    width: 100%; /* !important; */
				}                   /*end new code*/

				.form-inline .form-group{
					width: 48%;
					margin-bottom: 0.75em;
					vertical-align: top;
				}
			}
			

		</style>
		
		<?php
		$new_layout = ob_get_contents();
		ob_end_clean();
		
		$html .= $new_layout;
Unfortunately you cannot easily set fields one next to the other on a single row.

2, you can use in the hooks/<tablename>.php file the function <tablename>_before_insert and <tablename>_before_update to modify your SQL statement to put you notes into the history field with the date/time stamps. The $data contains the relevant information that you need to update.

Hope that helps
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

uchhavi
Veteran Member
Posts: 80
Joined: 2018-05-15 14:07

Re: Customized Table View

Post by uchhavi » 2018-05-23 07:17

HI

I applied the code you gave to make the 2 column display. But facing an issue

Please can you check this image

is it possible to increase the column size as mentioned?

Please can u add to the code u gave me earlier.
Attachments
2 Column issue.png
2 Column issue.png (81.73 KiB) Viewed 5808 times
Best regards,

Chhavi Jain

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Customized Table View

Post by pbottcher » 2018-05-23 07:41

Hi,

can you please check in the file dynamic.css (in your root directory of your project) the line (should be around line 50) containing

.form-inline .form-control{ width: auto !important;}

and remove the " !important; " so you have

.form-inline .form-control{ width: auto }

and set the width in the code snipet above to 100%.

That should do the trick.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

uchhavi
Veteran Member
Posts: 80
Joined: 2018-05-15 14:07

Re: Customized Table View

Post by uchhavi » 2018-05-23 08:17

yup... it did.. thanks :-)
Best regards,

Chhavi Jain

uchhavi
Veteran Member
Posts: 80
Joined: 2018-05-15 14:07

Re: Customized Table View

Post by uchhavi » 2018-05-23 08:25

but everytime i rebuild the project, i will need to make this change...

is there any way i can make the changes in the hooks folder??

my project is in development stage and i may have to rebuild it a lot of times.. so please help
Best regards,

Chhavi Jain

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Customized Table View

Post by pbottcher » 2018-05-23 09:01

The code is added (hopefolly) in the hooks folder. So this should be stable even after rebuild. For the dynamic.css.php, unfortunately you can only remove the tick in the box when creating your project, to not recreate the dynamic.css.php file.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

uchhavi
Veteran Member
Posts: 80
Joined: 2018-05-15 14:07

Re: Customized Table View

Post by uchhavi » 2018-05-23 10:18

ok... noted on that..

now is it possible to create a 2 column table view as well as tab view for the same table..
refering to the above image i posted.. i need the 2 column for all the fields... except I need notes to appear in the next tab... because the area is too small for the notes to come.

it is possible?
Best regards,

Chhavi Jain

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Customized Table View

Post by pbottcher » 2018-05-23 11:01

Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

uchhavi
Veteran Member
Posts: 80
Joined: 2018-05-15 14:07

Re: Customized Table View

Post by uchhavi » 2018-05-24 07:29

I have a question in the Form Tools Demo..

where am i supposed to place the function _mkfield and _mktabbed?

In tablename.php in the hooks folder at the end?
Best regards,

Chhavi Jain

Post Reply