数据网格EventHandler [英] Data grid EventHandler

查看:61
本文介绍了数据网格EventHandler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我创建了一个DataGrid,它正在显示来自数据库的数据(手动填充的数据库未分配).它正在为添加记录而工作.在其中的前两列是编辑和删除记录.当我们删除记录时,它会被删除并且可以正常工作,但是当手动刷新页面时,它会调用为delete命令编写的delete函数,并且在每次刷新时,它都会删除第一条记录.
请提出任何解决方案...

紧急.
谢谢!!!!

Hi,
I have created one DataGrid and it is showing the data from the database(manually filled database not assigned). It is working for addition of records. In it first 2 columns are edit and delete record. When we delete record it is deleted and working fine but when page refreshed manually it is calling the delete function written for delete command and on each refresh it is deleting first record.
Please suggest any solution......

Its urgent.
Thank You!!!

推荐答案

对于初学者来说,用于delete命令的过程或sql应该足够聪明,以至于不能删除没有有效参数的任何内容.听起来您的默认参数使用的标识符与您的第一条记录相同.

话虽如此,就像上面的test-09注释一样,没有一些代码段,我们不太可能为您提供帮助.
For starters, your procedure or sql for the delete command should be smart enough to not delete anything without a valid argument. It sounds like your default argument uses the same identifier as your first record.

That being said, like test-09''s comment above, without some code snippets we''re not likely to be able to help you much.


这篇关于数据网格EventHandler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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