This article will introduce how to customize the button in the jtable column. The following is a good example. If you are interested, refer
The Code is as follows:
Information :{
Title: 'info ',
Width: '5% ',
Sorting: false,
Edit: true,
Create: true,
Type: 'textea ',
Display: function (customerData ){
Var $ img = $ ('');
$ Img. click (function (){
$ ('# Mermerstablecontainer'). jtable ('openchildtable ',
$ Img. closest ('tr '),
{
Title: customerData. record. Name + '-information ',
Actions :{
ListAction: 'ajax/customer_info_actions.php? Action = list & searchterm = '+ customerData. record. CustomerNumber,
},
Fields :{
CustomerNumber :{
Title: 'number ',
Key: true,
Create: false,
Edit: false,
List: false
},
Information :{
Title: 'information ',
Create: false,
Edit: true,
List: true,
Type: 'textea'
},
}
}, Function (data) {// opened handler
Data. childTable. jtable ('load ');
});
});
Return $ img;
}
},
'''''