javascript - Datatable sorting but group rows - Stack Overflow

I want to enable sorting but group multiples row into one in the same time. So that they will always so

I want to enable sorting but group multiples row into one in the same time. So that they will always sorted by in groups. Like row of group 1 will stick with group 1 and so on..

I want to enable sorting but group multiples row into one in the same time. So that they will always sorted by in groups. Like row of group 1 will stick with group 1 and so on..

http://live.datatables/wuwaxiqe/1/edit

Share Improve this question edited Mar 15, 2018 at 17:57 Gyrocode. 59k16 gold badges157 silver badges192 bronze badges asked May 15, 2016 at 15:45 Jamie JordanJamie Jordan 2511 gold badge5 silver badges16 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

Use orderFixed option to always apply ordering to a certain column before/after any other columns.

For example:

var table = $('#example').DataTable({
   "orderFixed": {
      "pre": [ 2, 'asc' ]
   }        
});

See updated example for code and demonstration.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745469073a4629049.html

相关推荐

  • javascript - Datatable sorting but group rows - Stack Overflow

    I want to enable sorting but group multiples row into one in the same time. So that they will always so

    2小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信