Click on one of rows and show detail view in modal or pop-up window for add/edit

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
D Campbell
Posts: 20
Joined: 2017-03-12 09:32

Click on one of rows and show detail view in modal or pop-up window for add/edit

Post by D Campbell » 2017-08-16 18:14

Looking for something like click on one of rows from the table and show detail view in modal or pop-up window for add/edit info then save it, return to table?

R Tammam
Veteran Member
Posts: 113
Joined: 2017-08-26 15:35

Re: Click on one of rows and show detail view in modal or pop-up window for add/edit

Post by R Tammam » 2018-01-08 17:28

Hello D Campbell,

you can do it by adjusting the behavior of td on clicking on it

first you will insert your code in tablename-tv.js you will create this file in the hooks folder

then you will need some code like that


$j(function(){

//catch the behavior of clicking on any td , prevent it's defulat , the preventDefault dosn't work try to test it and then put your modal of pop up code in the file
$j("td a").click(function(event){

event.preventDefault();


//put your modal or popup behaviour here

})

})

The idea that in normal behavior on clicking on any record it submits a form and open a form for editing , we will jsut change it's behviour to be open in modal or pop up

hope it will help you

Regards,
Reham

Post Reply