Silverlight刷新domainDataSource

发布于 2024-12-19 14:47:09 字数 76 浏览 2 评论 0原文

我有数据网格,其项目源是domainDataSource。 如何刷新域数据源? domainDataSource1.Load() 不起作用

I have datagrid whichs items source is domainDataSource.
How i can refresh Domain data source?
domainDataSource1.Load() does not works

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

§普罗旺斯的薰衣草 2024-12-26 14:47:09

有时这会有所帮助:

myDomainDataSource.DomainContext.EntityContainer.Clear();
myDomainDataSource.Clear();

将它们放在 DomainDataSource 的 LoadingData 事件中。

Sometimes this helps:

myDomainDataSource.DomainContext.EntityContainer.Clear();
myDomainDataSource.Clear();

Drop those in your DomainDataSource's LoadingData event.

心房敞 2024-12-26 14:47:09

我认为这应该对您有用,但我的猜测是加载期间出现错误或加载完成,但您缺少 PropertyChanged 通知来告诉数据绑定更新视觉效果。

尝试将处理程序添加到 .Loading 和 .Loaded 以确保加载开始和完成时没有错误(并且有数据)。

如果这不能解决问题,请确保在 DataContext 上引发 PropertyChanged 事件。

I think that should work for you, but my guess is that there is an error during the load or the load is finishing, but you are missing a PropertyChanged notification to tell data binding to update the visuals.

Try adding handlers to .Loading and .Loaded to make sure the load is starting and finishing without errors (and with data).

If that does not solve the issue, make sure you are raising the PropertyChanged event on your DataContext.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文