在拖放过程中更新高级数据网格中的分层数据提供程序
我正在尝试将分层数据拖放到同一高级数据网格中,并且我希望在更新 ADG 时更新数据提供程序。 (我希望能够保存和加载这棵树,因此保存拖放操作非常重要。)
我在这里发布了一个示例应用程序(启用了查看源代码):www.crcarlson.com/adg/AdvancedDataGridDragAndDrop.swf
示例应用程序有一个 ADG,显示分层数据和平面数据。每个数据网格的第一列显示基础数据的行索引。
如果重新排列左侧 ADG 上的项目,行索引将变得无序。如果单击traceTree,您会发现数据提供程序不正常。
另一方面,如果您在右侧执行相同的操作,即使对象四处移动,行号也保持有序,并且如果您单击traceFlat,则数据提供程序将按照 ADG 上显示的顺序排列。
我的目标是让数据提供程序顺序匹配显示分层数据的左侧网格的 ADG 顺序。
我将不胜感激任何对此的建议,包括“你不能从这里到达那里,就这样吧。”
I am trying to drag and drop hierarchical data in the same advanced data grid, and I would like the data provider to updated when the ADG is updated. (I want to be able to save and load this tree, so it is important that drags and drops are saved.)
I have a sample application (with view source enabled) posted here: www.crcarlson.com/adg/AdvancedDataGridDragAndDrop.swf
The sample app has an ADG showing hierarchical data as well as flat data. The first column of each datagrid shows the rowindex of the underlying data.
If you rearrange the items on the left ADG, the row indexes become unordered. If you click traceTree you see that the data provider is not in order.
On the other hand if you do the same on the right, the row numbers stay ordered even when the objects move around and if you click traceFlat, the data provider is in the order shown on ADG
My goal is to have the data provider order match the ADG order for the left grid which is displaying hierarchical data.
I would appreciate any advice on this, including "you can't get there from here, do it this way."
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在仔细阅读代码和使用应用程序时,我注意到了一些事情:
以下是 Adobe 对使用拖放的看法。具体请查看标题为“移动和复制数据”的最后一页。祝你好运。
I noticed a few things while perusing your code and using the app:
Here's Adobe's take on Using Drag and Drop. Specifically check out the last page titled "Moving and copying data". Good luck to you.