.NET的WinForms - 编程结束当前编辑 - 的DataGridView [英] .NET WinForms - Programmatically End Current Edit - DataGridView

查看:194
本文介绍了.NET的WinForms - 编程结束当前编辑 - 的DataGridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你怎么能编程结束不失改变当前单元格的编辑?我有我的DataGridView设置为EditOnEnter模式。我试过EndEdit中()对电网但这背出当前编辑。

How can you programmatically end the current cell edit without losing the change? I have my DataGridView set to EditOnEnter mode. I tried EndEdit() on the grid but this backs out the current edit.

推荐答案

假设这是非常接近我与电网并没有看到任何code已经完成,我唯一没有不同的是跟随调用EndEdit中的DataGridView中通过调用EndEdit中的BindingSource的。

Assuming this is remarkably close to what I've done with the grid and without seeing any code, the only thing I did differently was to follow the call to EndEdit on the DataGridView with a call to EndEdit on the BindingSource.

这篇关于.NET的WinForms - 编程结束当前编辑 - 的DataGridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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