在 itemEditEnd 事件之前从 itemEditor 提交新值
我有一个 DataGrid,在几列中将 itemEditor
作为 NumericStepper
。当编辑 DataGrid 中的值时,我想更新屏幕上显示的几个值,因此想调用 updateValues()
函数。
首先,我将此函数添加到 DataGrid
的 itemEditEnd
事件中,但在新值更新到 dataProvider
之前调用该函数,并且因此,我在函数中拥有的值是旧值。将值更新到 dataProvider
后是否会触发任何其他事件?或者我错过了什么?
其次,我尝试将此函数放入每个 itemEditor
的更改事件中(废话!),但话又说回来,更改事件被触发,但 dataProvider
中的值是旧的。
有什么办法可以让函数 updateValues()
被调用,每次编辑一个值并将其更新到 dataProvider
中时,因为我从那里获取值?
多谢。
I have a DataGrid, with itemEditor
as NumericStepper
in a few columns. When a value in the DataGrid is edited, I would like to update several values displayed on the screen, and so want to call a updateValues()
function.
First, I added this function to itemEditEnd
event of the DataGrid
, but the function is getting called before the new value is updated into the dataProvider
and hence, the values I have in the function are the old values. Is there any other event that is fired after the values are updated into the dataProvider
? or am I missing something?
Second, I tried putting this function in the change event of each itemEditor
(duh!), but then again, the change event is fired, but the values in the dataProvider
are the old ones.
Is there any way I can make the function updateValues()
be called, every time a value is edited AND updated into the dataProvider
, because there's where I am taking the values from?
Thanks a lot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所以是的,它被调用在数据提供者拥有数据之前。
您应该阅读以下内容:检测数据网格编辑。他谈论的都是同样的事情。活动优先权是门票。 Flex 方式过于复杂。干杯。
So yeah, it gets called before the dataprovider has the data.
Here's what you should read: Detecting Datagrid Edits. He talks about all the same stuff. Event priority is the ticket. Overly complicated is the Flex way. Cheers.