网格过滤器没有´t使用多个值
Grid filter doesn´t work with multiples values
我对这个网格上的过滤器有问题:
网格声明:
>$("#grid2").kendoGrid({
dataSource: {
transport: {
read: "datos/CargarTipo_Impresion_s.php" //php file with mysql sentence
},
batch: true,
schema: {
model:
id: "notipoimpresion",
fields:
notipoimpresion: { type: "number" },
descripcion: { type: "string" },
nogrupo: { type: "number" },
}
}
},
//send notipoimpresion like parameter to the page : CargarTipo_Impresion_s.php
serverFiltering: true,
//filter: { field: "notipoimpresion", operator: "eq", value: "1,2" }, // with this filter is ok, show data
//filter: { field: "notipoimpresion", operator: "eq", value: 2 }, //with this filter is ok , show data
//filter: { field: "notipoimpresion", operator: "eq", value: '1,2' }, //with this filter is ok, show data
filter: { field: "notipoimpresion", operator: "eq", value: value_codigos_tipo_impresion }, //with this filter doesn´t show data
//value_codigos_tipo_impresion, can have this values: "1" or "1,2" or "1,2,4", etc.
//value_codigos_tipo_impresion, receive the value from a form text
在CargarTipo_Impresion_s.php中使用此选项:
$codigos_tipo_impresion=mysql_real_eescape_string($_REQUEST["filter"]["filters"][0]["value"]);
并执行mysql语句
在另一个例子中,php变量有效
过滤器:{字段:"notipoimpresion",运算符:"eq",值:"?php var_codigos_tipo_impresion;?"},
当$var_codigos_tipo_impresion:可以具有值:"1"、"1,2"、"1、2、3·等…
有人能告诉我,为什么不做过滤器吗?或者出了什么问题
谢谢
JC
示例和解决方案:代码更正和版本KendoUI CSS和JavaScript:v2012.3.1114
jsfiddle.net/jcpaquot/vJTwF/6][1]
相关文章:
- 为什么我的d3.jsselectAll+过滤器没有过滤
- Angularjs-utils高亮过滤器在搜索时破坏应用程序
- Angular-表的多列过滤器
- 如何“;过滤器”;或者以其他方式重构该数据
- Angularjs通过过滤器获取indexOf
- ui网格日期单元格过滤器,过滤日期格式导致显示错误的日期
- 使用按钮的Angular UI网格过滤器
- KendoUI网格行过滤器,带有布尔值下拉列表
- 如何在angular.js中动态应用自定义过滤器
- 角度过滤器和ng点击不起作用
- SVG过滤器可以'不能在React中呈现
- 使用javascript或angularjs特定过滤器搜索字符串中第一个img标记的json值
- 在表单中创建一个黑名单过滤器以避免某些单词
- 如何应用带过滤器的ng if来过滤记录,并在同一页面中显示两个不同的视图
- 过滤器返回true或false
- angularjs ng基于点击时的数组值重复过滤器
- DC.js带过滤器的订购
- 使用angularjs内置过滤器过滤代码中的特定属性
- 让我自己的过滤器不工作
- 添加到角度过滤器中的索引