0
在我的silverlight应用程序中,我在我的datagrid中绑定了一个类的组合框。 当我改变组合框,我可以得到类的索引,但是当我以编程方式更新类时,组合框不会改变 请帮我解决这个问题。紧急。 我使用Silverlight 3.0Silverlight组合框SelectedIndex不会改变绑定
<data:datagridtemplatecolumn header="Sale Unit" width="80" xmlns:data="#unknown">
<data:datagridtemplatecolumn.celleditingtemplate>
<datatemplate>
<combobox itemspanel="{Binding RelativeSource={RelativeSource Self}}" datacontext="{Binding}" selectedindex="{Binding Path=cursunit,Mode=TwoWay}" keydown="ComboBox_KeyDown" loaded="ComboBox_Loaded" selectionchanged="ComboBox_SelectionChanged">
<comboboxitem content="BOX" />
<comboboxitem content="STRIP" />
<comboboxitem content="PEICE" />
</combobox>
</datatemplate>
</data:datagridtemplatecolumn.celleditingtemplate>
</data:datagridtemplatecolumn>
你的cursunit类看起来如何? – Mharlin 2012-01-07 15:18:48