剑道网格重复记录已插入 [英] Kendo grid duplicate records inserted

查看:108
本文介绍了剑道网格重复记录已插入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在嵌入式编辑模式下有一个剑道网格. 当我按下添加新项"按钮时,将添加新行并将其设置为编辑模式. 通过多次按下更新"按钮,我可以将重复的记录插入数据库中.

I have a kendo grid in inline editing mode. When I press "Add new item" button, new row is added and set to the edit mode. By pressing the "Update" button multiple time, I'm able to insert duplicate records into database.

第一次单击后是否可以禁用更新"按钮?

Is there a possibility to disable Update button after the first click?

执行插入后,剑道网格上的行选择也会丢失. 那是正常行为吗?

Also row selection on kendo grid is lost after insert is performed. Is that normal behavior?

推荐答案

如果您不返回新插入的记录的ID,则会发生这种情况.除非您返回id值,否则Kendo DataSource会将它们视为新的. 文档.

This would happen if you don't return the ID of the newly inserted records. The Kendo DataSource would treat them as new unless you return the id values. More info is available in the documentation.

这篇关于剑道网格重复记录已插入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆