簡體   English   中英

編輯時應選擇kendo網格行

[英]kendo grid row should be selected while editing

我有一個與4輸入框綁定的網格。 當我單擊網格行時:使用該行中的列數據設置輸入值。

如果從第一次輸入我轉到第二個輸入,網格行退出所選樣式,但我想在用戶忙於編輯時選擇。

我在dataBound代碼中使用此代碼:

 var contact = $("#contact-grid").data("kendoGrid").tbody.find('tr[data-uid="' + this._selectedContact.uid + '"]');
    $("#contact-grid").data("kendoGrid").current(contact);

但它不起作用,並在輸入到另一個輸入模糊后關閉編輯視圖

好的,我發現:)。 並發布它以幫助其他人,也許有一天......

應該在grid dataBinding事件上編寫這段代碼:

private _onGridDataBinding(e){
 if(e.action == "itemchange")
   {e.preventDefault();}
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM