tags:

views:

66

answers:

1

How to create datagridComboBoxCell in Wpf so that runtime i can bind that cell??

A: 

I guess u mean column not cell, don't you?

For a column you could use something like this:

<dg:DataGridComboBoxColumn Header="Current Category"

SelectedValueBinding="{Binding Path=CurrentCategory}"

  SelectedValuePath="CategoryID"

DisplayMemberPath="CategoryName"

ItemsSource="{Binding Source={StaticResource categoriesDataProvider}}">

If you want to change bindings at runtime u have to name your column and set the appropiate bindings in code.

I found the XAML solution in the first result via google with search term "wpf datagrid combobox column".

batzen