开发者

Silverlight 3 + DataGrid.SelectedItems Question

I am binding a collection of MyItem cla开发者_运维技巧ss instances to a DataGrid. The MyItem class has a property called "IsSelected". This property can get changed programmatically. How do I propogate that change back to the UI such that if this value is true, the row associated with MyItem is highlighted (selected) and if it is false, the row associated with MyItem is not highlighted?

Thank you,


First make sure MyItem implements INotifyPropertyChanged and also use a ObservableCollection so your grid knows when the info has changed.

For the selection take a look at these blog they have a sample doing just what you want link text

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜