且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何检查用户是否更改了列值但忘记在Datagridview中单击“保存”按钮并显示“未保存数据”的警告

更新时间:2023-02-12 13:31:21

好的,那有什么问题?不要显示此消息框。相反,只需要一个布尔标志 modified ,然后静默地将其设置为true。稍后,当用户更改选项卡时,请检查此标志并进行相应处理。



-SA
Okay, so what's the problem? Don't show this message box. Instead, just have a Boolean flag modified and set it to true instead, silently. Later on, when the user changes the tab, check up this flag and process accordingly.

—SA

>