2013-08-05 67 views
0

中的選擇時,未在LightSwitch中設置Visuual Collection的選定項目我爲Silverlight控件創建了限制集合的lightswitch控件擴展。 (如DataGrid)在改變屏幕

它正確顯示屏幕上的數據,但在網格中選擇一行時,底層查詢的SelectedItem屬性沒有更新。當我使用LS DataGrid時,它按預期工作。

我在猜測是什麼,我需要綁定表和My Collection Control的選定項。

我怎樣才能在我的擴展本身?

謝謝..

回答

0

您是否將模式設置爲兩種方式?

SelectedItem="{Binding Screen.CreatedProperty, Mode=TwoWay} 

在你的屏幕代碼,這可能有所幫助:

partial void ResponsibleRoles_SelectionChanged() 
    { 
     if (this.query.SelectedItem != null) 
      Property = this.query.SelectedItem.field; 
    }