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

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -