2017-04-18 7 views
0

私は剣道グリッドを使用しています。ドロップダウンメニューから値を変更すると、その行には値が保存されません。クリックするとすぐに同じ値に戻ります。剣道グリッドインラインドロップダウンが機能しない

$(function() { 
    $("#grid").kendoGrid({ 
     pageable: true, 
     height: 550, 
     resizable: true, 
     toolbar: ["create"], 
     columns: [ 
      { field: "checkBox", filterable: false, title: "<input type=\'checkbox\' class='selectAll' />", width: "35px", template: "<input type=\'checkbox\' class=\'selectAll\' />" }, 
      { field: "index", filterable: true, title: "#", width: "35px" }, 
      { field: "Priority", editor: categoryDropDownEditor, filterable: true, title: "Priority Two", width: "120px" }, 
     ], 
     editable: true, 
     }) 
    }); 

function categoryDropDownEditor(container, options) { 
    $("<input data-bind='field:Priority' />") 
     .appendTo(container) 
     .kendoDropDownList({ 
      dataSource: [ 
       { title: "Yes" }, 
       { title: "No" } 
      ], 
      dataTextField: "title", 
      dataValueField: "title", 
     }); 
} 

はい/いいえドロップダウンを使用したいだけです。フィールドをクリックすると値が表示されますが、[はい]または[いいえ]を選択すると、グリッドに何も入力されません。これがなぜ機能していないのか分かりません。

答えて

1

あなたはこのjsFiddleを確認してくださいあなたのkendoDropDownList

valuePrimitiveを設定することができます。これはあなたのために働くことを望みます。

関連する問題