开发者

How do I bind a ComboBox

I have a ComboBox and need to bind it to a开发者_如何学Go DataGrid. How can I do that?


For example:

<tk:DataGrid x:Name="dgProducts" DataContext="GoodsCollection" IsSynchronizedWithCurrentItem="True" >
         <tk:DataGrid.Columns>
               <tk:DataGridComboBoxColumn Header="Good Name" 
                    x:Name="dgCbProduct" 
                            TextBinding="{Binding Path=GoodID, Converter={StaticResource GoodIDToGoodNameConverter}}"
                            SelectedValuePath="GoodName" 
                            DisplayMemberPath="GoodName">
                            </tk:DataGridComboBoxColumn>
          </tk:DataGrid.Columns>
</tk:DataGrid>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜