Javascript Datatables未对某些列进行排序

Javascript Datatables未对某些列进行排序,javascript,jquery,sorting,datatables,Javascript,Jquery,Sorting,Datatables,我正在使用jquerydatatables将数据呈现到我的表中,同时使用rowsGroup插件来呈现rowspan。 但我只能对部分列进行排序,而不能对所有列进行排序。 下面是我的代码,它对第一列进行排序,而不是对其余列进行排序。 为什么会这样?我如何解决这个问题 $(document).ready(function() { var resultArray = [ ["290013", "TEST OF ENSEMBLE", "11-25-2016", "", "", "220012

我正在使用jquerydatatables将数据呈现到我的表中,同时使用rowsGroup插件来呈现rowspan。 但我只能对部分列进行排序,而不能对所有列进行排序。 下面是我的代码,它对第一列进行排序,而不是对其余列进行排序。 为什么会这样?我如何解决这个问题

$(document).ready(function() {
  var resultArray = [
    ["290013", "TEST OF ENSEMBLE", "11-25-2016", "", "", "22001204", "TEST EP PRODUCT FOR DEVELOPMENT", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
    ["290015", "XXX5", "10-19-2016", "test", "$33.00", "22001204", "TEST EP PRODUCT FOR DEVELOPMENT", "2002", "XXX5", "XXX5", "XXX5", "", "1864", "2017", "VERSION", "23004746", "XXX5", "", "One Time", "", "", "", "", "", "", "21004482", "9189", "Feature Set", "20003880", "XXX5", "XXX5", "BASE", "19-APR-2017", "04-18-2017", "3877", "", ""],
    ["290015", "XXX5", "10-19-2016", "test", "$33.00", "22001204", "TEST EP PRODUCT FOR DEVELOPMENT", "", "", "", "", "", "1865", "Deluxe", "EDITION", "", "", "", "", "", "", "", "", "", "", "", "9190", "Charge", "", "", "", "", "", "", "", "", ""]
  ];

  console.log(JSON.stringify(resultArray));
  var table = $('#example').DataTable({
    columns: [{
      title: 'Item Master Number',
      name: 'ItemMasterNumber'
    }, {
      title: 'Description',
      name: 'Description'
    }, {
      title: 'First Processing Date',
      name: 'FirstProcessingDate'
    }, {
      title: 'Alias',
      name: 'Alias'
    }, {
      title: 'Master Price',
      name: 'MasterPrice'
    }, {
      title: 'Product Id',
      name: 'ProductId'
    }, {
      title: 'Product Description',
      name: 'ProductDescription'
    }, {
      title: 'Feature Set#',
      name: 'FeatureSetId'
    }, {
      title: 'Feature Set Code',
      name: 'FeatureSetCode'
    }, {
      title: 'Feature Set Name',
      name: 'FeatureSetName'
    }, {
      title: 'Feature Set Description',
      name: 'Feature Set Description'
    }, {
      title: 'Enablement Type',
      name: 'Enablement Type'
    }, {
      title: 'Feature Id',
      name: 'FeatureId'
    }, {
      title: 'Attribute Name',
      name: 'AttributeName'
    }, {
      title: 'Attribute Value',
      name: 'AttributeValue'
    }],
    data: resultArray,
    rowsGroup: [
      // Always the array (!) of the column-selectors in specified
      // order to which rows groupping is applied.
      // (column-selector could be any of specified in:
      // https://datatables.net/reference/type/column-selector)
      'ItemMasterNumber:name',
      'Description:name'
    ],
    pageLength: '20',
  });
});

代码片段:

你能不能在jsfiddlestack snippet中重现这个问题?@GuruprasadRao我不知道该怎么做,但我已经添加了一个指向snippet的链接,这是我的实际示例,我之前问过这个问题,代码片段是由某个编辑器添加的。有人可以吗帮我解决这个问题?没什么帮助,但我想!!这是@GuruprasadRao,您是否尝试了我在问题中分享的片段的链接。如果您看到无法对第2列、第3列和更多列进行排序。