0

我想name='gebuehr_text'在子网格中添加新行时禁用一个选择字段。将新行添加到子网格时会触发我的警报,但我禁用此选择字段的代码不起作用。任何想法我的代码有什么问题?


   //The Subgrid 
   
   $("#" + childGridID).inlineNav("#" + childGridPagerID,  {
   edittext: "Edit",
           addtext: "Add",
           savetext: "Save",
           canceltext: "Cancel",
           addParams: {
           position: "afterSelected",
           addRowParams: {
           new row
           keys: true,
           oneditfunc: function (rowid) {

           alert("new row with rowid=" + rowid + " are added.");
           
           //  THIS CODE DO NOT DISABLE THE SELECT                                      
                $("select[name='gebuehr_text']").prop("disabled", true);
           //  THIS CODE DO NOT DISABLE THE SELECT also            
                $("#"+ rowid + "_gebuehr_text").prop('disabled', true);  
        }
  }
},editParams: {
           // the parameters of editRow
           key: true,
           oneditfunc: function (rowid) {
               alert("row with rowid=" + rowid + " is editing.");
           //  $("#jqg2_gebuehr_text]").prop("disabled", true)
           }
   }           
});

4

0 回答 0