Kendo foreign key column filter not working for the category name -
Kendo foreign key column filter not working for the category name -
http://jsbin.com/cadevaha/1/edit?html,js,output click above link have reproduced situation. have foreign key column category returns category name based upon product name value. want filter based upon foreign key value category name.in simple terms, filtering not happening category column.
this because have not specified type of column.
this done through datasource.schema.model.fields configuration.
<head> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.1.416/styles/kendo.common.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.1.416/styles/kendo.rtl.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.1.416/styles/kendo.default.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.1.416/styles/kendo.dataviz.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.1.416/styles/kendo.dataviz.default.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.1.416/styles/kendo.mobile.all.min.css"> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://cdn.kendostatic.com/2014.1.416/js/kendo.all.min.js"></script> <meta charset=utf-8 /> <title>kendo dojo grid</title> </head> <body> <div id="grid"></div> <script> $("#grid").kendogrid({ columns: [{ field: "productname" }, { field: "category", values: [{ text: "beverages", value: 1 }, { text: "food", value: 2 }] }], datasource: { data: [{ productname: "tea", category: 1 }, { productname: "ham", category: 2 } ], schema: { model: { fields: { category: { type: "number" } } } } }, filterable: true }); </script> </body>
kendo-ui kendo-grid kendo-asp.net-mvc
Comments
Post a Comment