Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Jtable createaction #2904


User avatar
0
cangunaydin created

Hello, This question can be more related with jtable but since i am not super familiar with jtable i want to ask here first.

I want to intervene to the jtable event when it is clicked to the add new record button and open a custom modal that i have created. I have looked at the api reference of jtable and find out the formCreated event i can open the custom popup but it is also displaying the jquery ui dialog on the background. is there any way not to show the jquery ui modal? I am using master child tables so i want to create add new record button on the top of the child table, if i disable the create action then i can not implement my custom button over there. Any suggestion is appreciated. Thanks for the help.


2 Answer(s)
  • User Avatar
    0
    cangunaydin created

    Hello never mind about this thread. I have solved it. I have found out the toolbar option in jtable. I disabled the createaction and instead of that i have created a toolbar item and on the click event i have showed my custom modal. I hope it can be helpful for someone else.

    toolbar: {
                                                        hoverAnimation: true, //Enable/disable small animation on mouse hover to a toolbar item.
                                                        hoverAnimationDuration: 60, //Duration of the hover animation.
                                                        hoverAnimationEasing: undefined, //Easing of the hover animation. Uses jQuery's default animation ('swing') if set to undefined.
                                                        items: [{
                                                            text: self.l('CreateNewAddress'),
                                                            click: function () {
                                                                //perform your custom job...
                                                                self.createOrEditAddressModal.show();
                                                            }
                                                        }]
                                                    }
    
  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @cangunaydin :)