开发者

GroupDescriptor in SL4B2

Using Silverlight4, how can I make datagrid grouping look up a display name from another table when the grouping value is a foreign key?

I could denormalise the entity so that it resolves the join itself but this introduces update issues. The approach that leaps to mind is a value converter and I shall look into i开发者_Go百科t, but if you have a definite answer any advice would be appreciated.

NOTE Using a join inside a view works nicely, although you do then have to explicitly handle updates. There are, however, other problems associated with grouping in datagrids. Expanding or collapsing a group causes the datagrid's CurrentItem to be NULL which seems to break the bindings for any comboboxes bound to lookups on the same DataContext. If anyone has a solution or at least advice on how to re-bind the comboboxes that would be appreciated; in the interim I have abandoned the use of grouping.


You can't do it directly. Use a view and handle update explicitly. Grouping breaks combobox lookups so if you have those abandon hope of grouping.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜