【发布时间】:2014-01-14 16:55:42
【问题描述】:
一旦我的 Jtable 被加载,就会触发一个返回 id 的函数。我想根据这个 id 选择行或在每一行中选中一个复选框。
加载工作正常,复选框显示。但是我无法处理复选框以编程方式选择它们。
感谢任何帮助。
我的表创建代码是这样的:
//Table Definition
$('#dvChangeOrd').jtable({
title: 'Change Order Selection (Select all that apply to this request):',
paging: true,
pageSize: 5,
sorting: true,
defaultSorting: 'ChangeOrd ASC',
selecting: true, //Enable selecting
multiselect: true, //Allow multiple selecting
selectingCheckboxes: true, //Show checkboxes on first column
recordsLoaded: function (event, data) {
},
actions: {
listAction: 'c013.aspx/LoadLists',
},
fields: {
ChangeOrd: {
title: 'Change Order',
width: '15%',
},
Type: {
title: 'Type',
width: '25%',
},
Status: {
title: 'Status',
width: '10%',
},
ChangeDesc: {
title: 'Change Description',
width: '50%',
},
Amount: {
title: 'Amount',
width: '20%',
},
},
//Register to selectionChanged event to hanlde events
selectionChanged: function () {
},
});
加载记录后,可能在记录加载功能中,我想从服务器响应中选择具有 id 匹配的复选框,或者从服务器获取一组 id 的任何其他方式,然后选中对应于的复选框它。
谢谢
【问题讨论】:
-
对于example。
-
抱歉,这个问题是关于 jquery Jtable 的。我已经更新了标签。感谢您的帮助。
-
你能添加你的jtable的代码和你触发的函数吗?
标签: jquery html jquery-jtable