2015-04-07 57 views
2

过滤器KendoUI网格行过滤器基本工作正常,但,与下拉布尔

  • 的选择似乎不火的第一选择
  • 发生这种情况每次过滤器被重置,以及时间。

我用它为插手现在看两天......

这里是Fiddle

<script src="../content/shared/js/products.js"></script> 

<div id="grid"></div> 

    <script> 
    $(document).ready(function() { 
     $("#grid").kendoGrid({ 
     dataSource: { 
      data: products, 
      schema: { 
      model: { 
       fields: { 
       ProductName: { type: "string" }, 
       Discontinued: { type: "boolean" } 
       } 
      } 
      }, 
      pageSize: 20 
     }, 
     height: 550, 
     scrollable: true, 
     sortable: true, 
     filterable: { 
      mode: "row" 
     }, 
     pageable: { 
      input: true, 
      numeric: false 
     }, 
     columns: [ 
      { 
      field: "ProductName", 
      title: "Product Name", 
      filterable: { 
       cell: { 
       operator: "contains", 
       showOperators: false 
       } 
      } 
      }, { 
      field: "Discontinued", title: "Discontinued", 
      filterable: { 
       mode: "row", 
       cell: { 
       showOperators: false, 
       template: function (args) { 
        args.element.kendoDropDownList({ 
        autoBind:false, 
        dataTextField: "text", 
        dataValueField: "value", 
        dataSource: new kendo.data.DataSource({ 
         data: [{ text: "Yes", value: "true" }, 
          { text: "No", value: "false" }] 
        }), 
        index: 0, 
        optionLabel: { 
         text: "Filter", 
         value: "" 
        }, 
        valuePrimitive: true 

        }) 
       } 
       } 
      } 
      } 
     ] 
     }); 
    }); 
    </script> 

回答

3

剑道UI 2015年Q1有很多关于它的bug,特别是在下拉家庭小部件一样自动完成,多选,下拉等。 更改您的剑道图书馆到2014年或以前的版本将使其工作正常, 检查此dojo

+0

FYI,wit h新Kendo UI 2015 Q1 SP1现在完美运作 –