我有一个包含3列A,B和C的表。现在默认情况下,我想在开始时基于C对其进行排序。但我不知道为什么它不起作用。它显示了列C上的向下箭头,但数据未排序。
{
"processing": true,
"scrollX": true,
"columns": [
{
bSortable: true
bVisible: true
data: "A"
filtering: true
label: "A"
mData: "A"
mRender: (data, type, row)
orderable: true
render: (data, type, row)
total: false
visible: true
},
{
bSortable: true
bVisible: true
data: "B"
filtering: true
label: "B"
mData: "B"
mRender: (data, type, row)
orderable: true
render: (data, type, row)
total: false
visible: true
},
{
bSortable: true
bVisible: true
data: "C"
filtering: true
label: "C"
mData: "C"
mRender: (data, type, row)
orderable: true
render: (data, type, row)
total: false
visible: true
},
],
"pageLength": 10,
"paging": true,
"pagingType": "simple_numbers",
"lengthChange": false,
"bPaginate": false,
"bDeferRender": true,
"bSortable": true,
"columnDefs": [],
"searching": false,
"oScroll": {
"iBarWidth": 7
},
"dom": "frtlS",
"aaSorting": [ [ 2, "desc" ] ],
"aoColumnDefs": [
{
"aTargets": [ 0 ], "bSortable": true
},
{
"aTargets": [ 1 ], "bSortable": true
},
{
"aTargets": [ 2 ], "bSortable": true
}
]
}
任何类型的帮助都将受到高度赞赏。