在Silverlight中绑定两个数据源的网格 [英] Binding a grid with two datasources in silverlight

查看:200
本文介绍了在Silverlight中绑定两个数据源的网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,我应该如何绑定我的数据网格最好的方式。



问题是我想使用两个itemSources。
我有一个有很多事件的列表,每个事件都有一个bug的列表。
我想做的是将一半的gridview行与事件的一些字段绑定,一半的网格具有事件所对应的相应错误。



如何以最好的方式做到这一点?



我可以访问componentOne数据网格,但是如果普通网格工作起来很好。



但是想要排序功能。



谢谢

解决方案

我同意Kavet的想法,但他的解决方案远离现实。
根据 http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol.itemssource(v = vs95).aspx



ItemSourse必须实现IEnumerable接口。



这意味着您的ItemWrapper将无法正常工作。



你试过运行吗?


I'm having a problem with how I should bind my datagrid in the best way.

The problem is that i would like to use two itemSources. I have a list with alot of incidents, each incident holds a list of buggs. What I would like to do is bind half a gridview row with some of the fields from the incident, and half of the grid with the corresponding bugs that the incident holds.

How would I be able to do this in the best way?

I have access to the componentOne datagrid, but if the normal grid works it's all good.

But I do would like to have a sorting ability.

Thank you

解决方案

I'm agree with Kavet's idea but his solution is far away then the reality. According to http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol.itemssource(v=vs.95).aspx

ItemSourse must have IEnumerable interface implemented.

that mean your ItemWrapper will not work at all.

Have you tried to run this?

这篇关于在Silverlight中绑定两个数据源的网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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