admin管理员组文章数量:1404461
i'm looking to find and replace specific values from a known column with the plugin called Datatables.
Here is my code to do that :
table.columns(5).search('valuetochange').cells().every( function () {
this.data('newvalue');
});
But it is not working, I also tried other solutions but I didn't find a way to update the cells.
Thank you for your help
i'm looking to find and replace specific values from a known column with the plugin called Datatables.
Here is my code to do that :
table.columns(5).search('valuetochange').cells().every( function () {
this.data('newvalue');
});
But it is not working, I also tried other solutions but I didn't find a way to update the cells.
Thank you for your help
Share edited Jun 19, 2015 at 12:28 Dhiraj 33.6k10 gold badges65 silver badges78 bronze badges asked Jun 19, 2015 at 12:27 bidou88bidou88 6942 gold badges10 silver badges31 bronze badges1 Answer
Reset to default 6I have not used search method but alternatively this will definitely work
table.column(5).nodes().each(function (node, index, dt) {
if(table.cell(node).data() == valuetochange){
table.cell(node).data('100');
}
});
Here is a demo JsFiddle
本文标签: javascriptFind and replace cells value with Datatables pluginStack Overflow
版权声明:本文标题:javascript - Find and replace cells value with Datatables plugin - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744808416a2626289.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论