Add Custom Button At End Of Fields In Jquery - Jtable Create/update Mode Like Submit Button
At jquery- jTable we can have some fields and actions . I need Other button [possible at end of page] near by Jquery JTable button('Submit' button) that after on Click , run ano
Solution 1:
Maybe I misunderstood but if you want to add a button on each row, you can use display
property of the field. I created a dummy field and added the display property. Somthing like this:
...
Other: {
title: 'Other',
display: function (data) {
return'<b>test</b>';
},
create: false,
edit: false
}
...
However, if you wanted to add a general feature (i.e. single button for the table) , you can take a look at the toolbar
property.
Solution 2:
I did as follow. The tag <button>
and class="jtable-command-button"
are always required. The next step is your class for icon and finally the event.
actions: {
title: 'Actions',
width: '1%',
sorting: false,
create: false,
edit: false,
list: true,
display: function (data) {
if (data.record) {
// This if you want a custom edit action.return'<button title="Edit" class="jtable-command-button jtable-edit-command-button" onclick="alert(' + data.record.id + '); return false;"><span>Edit</span></button>';
}
}
}
Post a Comment for "Add Custom Button At End Of Fields In Jquery - Jtable Create/update Mode Like Submit Button"