当所有行都加载到 Silverlight DataGrid 中时发出通知

发布于 2024-07-23 08:26:59 字数 98 浏览 6 评论 0原文

一旦所有行都完成,我需要在 silverlight 数据网格上进行一些后处理。 一旦完成,我没有看到任何事件发生; 我缺少什么?

非常感谢代码示例或链接。

I need to do some post-processing on a silverlight datagrid once all the rows are. I don't see any events that fire once that's done; what am I missing?

Code samples or links are greatly appreciated.

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

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

发布评论

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

评论(2

悲凉≈ 2024-07-30 08:26:59

我找到了以下解决方案。 它未经测试,但鉴于问题与您的问题完全相同,它应该有效。

dataGrid.LoadingRow += new EventHandler(dataGrid_LoadingRow);

void dataGrid_LoadingRow(object sender, DataGridRowEventArgs e)
{
    dataGrid.LoadingRow -= new EventHandler(dataGrid_LoadingRow);

    this.Dispatcher.BeginInvoke(delegate

    {
         /*Process My Logic*/

    });
}

(来源:yifung @ Silverlight 论坛)

I found the following solution. It's untested, but given that the question was exactly the same as yours, it should work.

dataGrid.LoadingRow += new EventHandler(dataGrid_LoadingRow);

void dataGrid_LoadingRow(object sender, DataGridRowEventArgs e)
{
    dataGrid.LoadingRow -= new EventHandler(dataGrid_LoadingRow);

    this.Dispatcher.BeginInvoke(delegate

    {
         /*Process My Logic*/

    });
}

(Source: yifung @ Silverlight Forums)

再见回来 2024-07-30 08:26:59

你为什么需要那个? 据我所知,当网格填充并且绑定完成时,您将重新获得控制权。

myGrid.ItemsSource = myObservableCollection;
// here everything is loaded

Why would you need that? AFAIK you'll get control back when the grid is populated and the binding is complete.

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