jquery jtable custom click event -


i have implemented jtable of jquery. want perform operation on row click , want put separate image , want add own click event on image.

i want pass row's id custom event.

how can add jquery table?

i tried stuffs.

loadgrid = (function () {             //prepare jtable plugin             $('#gridtablecontainer').jtable({                 title: 'assets',                 paging: true,                 pagesize: 10,                 sorting: true,                 defaultsorting: 'modelname asc',                 actions: {                     listaction: '/adminsec/manageassets.aspx/list',                     createaction: '/adminsec/manageassets.aspx/createorupdate',                     updateaction: '/adminsec/manageassets.aspx/createorupdate',                     deleteaction: '/adminsec/manageassets.aspx/deletes'                 },                 updaterecord: (function() { alert("my custom action.");                 }), ....... 

finally, done.

customaction: {                         title: '',                         width: '1%',                         sorting: false,                         create: false,                         edit: false,                         list: true,                         display: function (data) {                             if (data.record) {                                 return '<button title="edit record" class="jtable-command-button jtable-edit-command-button" onclick="alert(' + data.record.ticketid + '); return false;"><span>edit record</span></button>';                             }                         }                     } 

thanks.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -