我阅读了 Jtable 引用资料并看到了样本, 我想将复选框列添加到 Jtable 结果中,并且每个复选框都有唯一的 ID。
默认有Jquery Jtable复选框列吗?
或者每个人都可以告诉我样本吗? 这是我的代码:
$('#PersonTableContainer').jtable({
title: 'Table of people',
actions: {
listAction: '/GettingStarted/PersonList',
createAction: '/GettingStarted/CreatePerson',
updateAction: '/GettingStarted/UpdatePerson',
deleteAction: '/GettingStarted/DeletePerson'
},
fields: {
PersonId: {
key: true,
list: false
},
Name: {
title: 'Author Name',
width: '40%'
},
Age: {
title: 'Age',
width: '20%'
},
RecordDate: {
title: 'Record date',
width: '30%',
type: 'date',
create: false,
edit: false
}
}
});
最佳答案
你看过这个页面吗:SelectingRows
您可以像这样添加复选框字段:
RowCheckbox: {
title: 'Status',
width: '12%',
type: 'checkbox',
values: { 'false': 'Passive', 'true': 'Active' },
defaultValue: 'true'
},
关于javascript - 如何将复选框列添加到 jquery JTable?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18560162/