Javascript 如何向可移动行/单元格添加数据值
我正在创建这样的footable:Javascript 如何向可移动行/单元格添加数据值,javascript,footable,Javascript,Footable,我正在创建这样的footable: $('#itemsTable').footable({ "rows": items.AllItems, "paging": { "size": 20, "container": '#pagination-container', "countFormat": "Страница {CP} из {TP}", "limit
$('#itemsTable').footable({
"rows": items.AllItems,
"paging": {
"size": 20,
"container": '#pagination-container',
"countFormat": "Страница {CP} из {TP}",
"limit": 8
},
"sorting": {
"enabled": true
}
});
{
"property1": {
"options": {
"id": "1"
},
"value": "<span class =\"row-val\"> </span>"
}
}
我需要添加所有
和
数据值。应该是这样的:
$('#itemsTable').footable({
"rows": items.AllItems,
"paging": {
"size": 20,
"container": '#pagination-container',
"countFormat": "Страница {CP} из {TP}",
"limit": 8
},
"sorting": {
"enabled": true
}
});
{
"property1": {
"options": {
"id": "1"
},
"value": "<span class =\"row-val\"> </span>"
}
}
值
运输署亦一样:
Value
如果能够修改JSON,则可以通过每个对象属性的嵌套“options”属性添加单元格数据(
)的数据属性。因此,如果您想附加数据id
,它将如下所示:
$('#itemsTable').footable({
"rows": items.AllItems,
"paging": {
"size": 20,
"container": '#pagination-container',
"countFormat": "Страница {CP} из {TP}",
"limit": 8
},
"sorting": {
"enabled": true
}
});
{
"property1": {
"options": {
"id": "1"
},
"value": "<span class =\"row-val\"> </span>"
}
}
如果您能够修改JSON,则可以通过每个对象属性的嵌套“选项”属性添加单元格数据的数据属性(
)。因此,如果您想附加数据id
,它将如下所示:
$('#itemsTable').footable({
"rows": items.AllItems,
"paging": {
"size": 20,
"container": '#pagination-container',
"countFormat": "Страница {CP} из {TP}",
"limit": 8
},
"sorting": {
"enabled": true
}
});
{
"property1": {
"options": {
"id": "1"
},
"value": "<span class =\"row-val\"> </span>"
}
}