在Datagridview中停留时提示? [英] Prompt While Leaving a Row in Datagridview?

查看:75
本文介绍了在Datagridview中停留时提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在Form1中有一个Datagridview,并且我正在使用Datatable作为Datagridview的数据源.

当用户编辑特定行中的任何单元格值,并使该行不保存或不更新时,它应提示一条消息,提示您是否要保存更改"

任何想法或建议将不胜感激.


问候,
Pawan.

Hi All,

I have a Datagridview in Form1,and I am using Datatable as DataSource to Datagridview.

When User Edits Any Cell Value in particular Row, and Leaves that Row without Save Or Update, it should prompt a message saying that "You Want To Save Changes Or Not"

Any Idea or Suggestion would be appreciated.


Regards,
Pawan.

推荐答案

您可以使用DataGridView.OnRowEnter [ DataGridView.OnRowLeave [ ^ ]事件,仅是执行此操作的众多方法中的三种.

还请考虑各种Validating事件.

为什么不阅读文档,看看是否可以找到更好的方法.
You can use the DataGridView.OnSelectionChanged[^], DataGridView.OnRowEnter[^], DataGridView.OnRowLeave[^] events, to name but three of the many ways to do this.

Also think about the various Validating events.

Why not read the documentation to see if you can find better ways.


这篇关于在Datagridview中停留时提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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