簡體   English   中英

自定義彈出編輯器 - Kendo UI 網格

[英]Custom popup editor - Kendo UI grid

是否可以為劍道網格提供用戶定義的彈出編輯器? 如果是,如何添加該編輯器?

當我單擊網格上的編輯按鈕時,我希望下面的編輯器彈出,

<div class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header" style="padding-top: 10px;">
                </div>
                <div class="modal-body">


                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
                    <button type="button" class="btn btn-primary" ng-click="SaveZone()">Save</button>
                </div>
            </div>
        </div>
    </div>

您需要像這樣指定劍道模板:

<script id="custom_editor" type="text/x-kendo-template">
    <div>
        <label> some label </label>
    </div>
    <div>
        <input type="text" name="Name" />
    </div>
</script>

請注意,需要 name 參數才能將輸入正確映射到模型中的字段。

然后在您的網格中指定可編輯的

...    
editable: {
    mode: "popup",
    template: kendo.template($("#custom_editor").html())
},
...

暫無
暫無

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

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