从绑定到网格的控件中按Enter键时,该值不会更新为网格. [英] The value is not updated to grid while pressing enter from the control binded to the grid.

查看:43
本文介绍了从绑定到网格的控件中按Enter键时,该值不会更新为网格.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经将自己的用户控件绑定到网格.我已经将控件的值更新为CellLeave事件中的网格.按下TAB并离开单元时,其工作正常.但是当我按ENTER键时不会触发该事件.

有人可以帮我这个忙吗?您可以编写代码来检测是否已按下Enter键,然后离开该单元格.我认为您可能还可以设置接受输入"属性,以更改输入是否为有效输入或是否离开单元格


Hi All,

I have binded my own user control to the grid. I have updated the value from the control to the grid in the CellLeave Event. Its working when im pressing the TAB and leave from the cell. But the event is not getting fired when im pressing the ENTER key.

Can anyone pls help me on this.

解决方案

It sounds to me like your cell is accepting enter as input and not being left. You can write code to detect that enter was pressed, and leave the cell. I think there may be an ''accept enter'' property as well that you can set, to change if enter is valid input, or if it leaves the cell


这篇关于从绑定到网格的控件中按Enter键时,该值不会更新为网格.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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