duanfang7270 2013-04-18 11:29
浏览 190
已采纳

用于创建按钮的KendoUI网格自定义弹出模板

i have installed KendoGrid with POPUP option.

Now i am stuck someplace and i cant find any help to fix it with the way i want..

So here is problem that i am facing with KendoGrid popup editing.

When i click ADD New Record, the header on Top shows Edit, same as it shows on when i click on Edit.

http://jsfiddle.net/valchev/BCBzS/1/

also the button shows Update, instead it should be save button on create popup window..

i think i have to add something more like this below for creating new record..

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

and have the popup create template different from edit template?

Can anyone help me resolve this issue?

  • 写回答

3条回答 默认 最新

  • dongwen1909 2013-04-18 13:41
    关注

    If you look at the demo page for popup editing this seems to be the normal behaviour...

    But you can trick and use the edit event of the grid in order to change that. Just add at the beginning of this event the following code :

    if(!e.model.Id) {
        $(".k-window .k-window-title").text("Add new record");
        $(".k-window .k-grid-update").html("<span class=\"k-icon k-update\"></span>Create");
    }   
    

    See the updated jsFiddle.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿