实现效果:当在Grid上选择某一行数据时候,在属性框上被动刷新数据。
如下图


1)定义一个 dispatchlistselectionchange 事件,将grid上的record数据作为参数传入;

2)在PropertyGrid 中处理dispatchlistselectionchange事件传来的record数据
调用PropertyGrid的setSource 方法,将传进来的record数据更新在组件上。

3)在GridPanel中增加dispatchlistselectionchange事件的监听器;

4)在GridPanel的rowclick事件中触发 dispatchlistselectionchange 事件

本文介绍如何在Grid上选择某一行数据时,通过定义dispatchlistselectionchange事件,将记录数据传递到PropertyGrid组件中,并使用setSource方法更新属性框内容,实现数据的实时同步。
614

被折叠的 条评论
为什么被折叠?



