yadcf没有使用渲染Colums搜索Value(yadcf not searching the Value with render Colums)

编程入门 行业动态 更新时间:2024-10-05 01:17:25
yadcf没有使用渲染Colums搜索Value(yadcf not searching the Value with render Colums)

我正在使用yadcf和Datatable

JavaScript的:代码

$(document).ready(function () { $.ajax({ url: 'data.asmx/getData', method: 'post', dataType: 'json', success: function (data) { $("#tableDiv").show(); var t = $('#studentDataTable').DataTable({ data: data, 'columns': [ { data: null render: function (data, type, row) { return data['fname']+' '+data['mname']+' '+ data['lname']; } }, ], }); yadcf.init(t, [ { column_number: 0, filter_type: "auto_complete", } 'footer', { cumulative_filtering: true, } ); t.draw(); } }); });

但是当我在文本框中键入任何数据时,它不会搜索它。 我也尝试过选择过滤类型,也不起作用,选择框保持为空,除了默认标签。 谁知道这个问题是什么?

am using yadcf with Datatable

javaScript:code

$(document).ready(function () { $.ajax({ url: 'data.asmx/getData', method: 'post', dataType: 'json', success: function (data) { $("#tableDiv").show(); var t = $('#studentDataTable').DataTable({ data: data, 'columns': [ { data: null render: function (data, type, row) { return data['fname']+' '+data['mname']+' '+ data['lname']; } }, ], }); yadcf.init(t, [ { column_number: 0, filter_type: "auto_complete", } 'footer', { cumulative_filtering: true, } ); t.draw(); } }); });

but When i type any data in the text box its not searching it. I also tried Select filtering type that also not working,select box stays empty apart from default label. anyone knows whats the Problem ?

最满意答案

获取0.9.0.beta.12并使用column_data_type: rendered_html作为过滤器, 请参阅docs

{ column_number: 0, column_data_type: rendered_html, filter_type: "auto_complete", }

对于范围滑块 - 应使用以下设置(请注意ignore_char / filter_plugin_options

{ column_number: 2, filter_type: "range_number_slider", ignore_char: "%", filter_plugin_options: {step:0.01} }

看到工作jsfiddle

如果这没有用,请提供一个jsbin示例来解决您的问题

Grab the 0.9.0.beta.12 and use column_data_type: rendered_html for the filter, see docs

{ column_number: 0, column_data_type: rendered_html, filter_type: "auto_complete", }

As to your range slider - the following setup should be used (notice the ignore_char / filter_plugin_options

{ column_number: 2, filter_type: "range_number_slider", ignore_char: "%", filter_plugin_options: {step:0.01} }

see working jsfiddle

If that won't help, provide a jsbin sample with your issue

更多推荐

本文发布于:2023-07-09 10:12:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1085562.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Colums   yadcf   render   searching

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!