2015-04-07 58 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現在完美運作 –