How to avoid mixup between rowcallback and sorting in datatable

 ̄綄美尐妖づ 提交于 2019-12-05 14:57:14

The num you are using in your javascript to select rows to gray out is based on the row number on the current display so not impacted by sorting.

You could try replacing your if statement in your rowCallbackMeta function by:

if(data[0].search('remove') > -1)

This looks for "remove" in the first column of the data to exclude rows, and works because your glyphicon in the first column is updated to <i class="glyphicon glyphicon-remove"></i> when you exclude rows.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!