Silverlight 4 Datagrid问题 [英] Silverlight 4 Datagrid Problem

查看:102
本文介绍了Silverlight 4 Datagrid问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些帮助来解决Silverlight 4中DataGrid的问题。 


我在datatemplate中有一些DatePicker控件,其中包含绑定到视图模型集合的DataGrid中的两行。该集合最多包含约1000条记录。 当用户使用鼠标滚轮向上和向下滚动时,一切都很顺利。 
当用户抓住滚动条并上下滚动时,DatePicker控件会神秘地从先前显示的记录中获取数据。我已经验证了幻像数据没有被写回数据模型。在调试中,证明
绑定在错误的记录上触发。


似乎只有DatePicker作为文本框才会发生,相同的绑定不会失败。


由于验收测试计划,在此迭代期间将项目转换为Silverlight 5是不可接受的。我会将datagrid转换为带有数据模板的List控件,但是用户有同样的担忧,宁愿等待下一次
升级。


我不确定我是否我正在使用最新版本的SL 4 DataGrid(System.Windows.Data运行时版本v2.0.50727)。如果DataGrid / DatePicker控件的更新如何转换为它们?


解决方案

你可以在这里提供问题重现项目,你可以将它上传到skydrive


或者你可以将它报告给microsoft: https://connect.microsoft.com/VisualStudio/


I need some assistance solving an issue with the DataGrid in Silverlight 4. 

I have some DatePicker controls in a datatemplate containing two rows in a DataGrid bound to a collection of view models. The collection contains a maximum of about 1000 records.  When the user scrolls up and down with the mouse wheel all is well.  When the user grabs the scroll bar and scrolls up and down the DatePicker controls mysteriously take on data from the previously displayed records. I have verified that the phantom data is not being written back to the data model. In debugging it is proven that the bindings are firing on the wrong records.

It seems to only happen with the DatePicker as a textbox with the same bindings does not fail.

Due to acceptance testing schedules it is not acceptable to convert the project to Silverlight 5 during this iteration. I would convert the datagrid to a List control with data templates, but the user has the same concern and would rather wait for the next upgrade.

I am not sure if I am using the latest version of the SL 4 DataGrid (System.Windows.Data Runtime version v2.0.50727). If there is an update for the DataGrid/DatePicker controls how do I convert to them?

解决方案

could you provide the issue reproduce project here, you can upload it into skydrive

or you could report it to microsoft:https://connect.microsoft.com/VisualStudio/


这篇关于Silverlight 4 Datagrid问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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