bootstrapTable中如何设置CheckBox选中一个,其他为不可选中状态
function BusinessLicenseView() {
$('#BusinessLicenseTable').bootstrapTable('destroy');
//加载人员数据
var oTable = new TableInitPersonnel();
oTable.Init(
url = contextUri + "/BusinessLicenseBorrowing/Apply/GetBusinessLicenseList",
columns = [
{
checkbox: true, formatter: function (value, row, index) {//设置满足条件的行可以使用复选框
if ($("input[name='MasterCopyType']:checked").val() == 0) {
return {
disabled: true
}
}
} },
{ field: 'Gid', title: '@Resources.Global.BusinessLicenseNumber', align: "center", width: 100 },
{ field: 'BusinessLicenseName', title: '@Resources.Global.NameOfBusinessLicense', align: "center", width: 100 },
{ field: 'ManagementAD', title: '@Resources.Global.AdministratorNumber', align: "center", width: 100 },
{ field: 'ManagementName', title: '@Resources.Global.AdministratorName', align: "center", width: 100 }
]
);
$('#BusinessLicenseTable').bootstrapTable('hideColumn', 'Gid');
//显示人员选择窗体
$('#modal-BusinessLicense').modal({
show: true,
backdrop: 'static',
keyboard: false
});
}
我这个的逻辑是三个单选框0,1,2如果为0则CheckBox选择一行其他CheckBox不可选中,如果为1或2则可以进行多选