Hi,
I am creating a WPF Datagrid with the combobox column in it. All the datagrid binding and combobox column binding works fine without any problem. But, when I select a value in the combobox column and move to the next column or row, the value is reset to
the previous empty selection. Am I missing anything here?
Please find the code snippet that I have used below.
<dg:DataGridComboBoxColumn x:Name="technicianname" Header="Assigned To" ItemsSource="{Binding}"/>
technicianname.ItemsSource = dtTechnicianInfo.DefaultView;
technicianname.DisplayMemberPath = "TechnicianName";
technicianname.SelectedValuePath = "TechnicianEid";
Thanks in Advance!!!
Best Regards,
Subalakshmi Vijayarajan.

I have a ComboBox bound to a list of custom objects (Person).
Each Person has a Friends collection.
I want a ListBox below the ComboBox to contain a list of Friends depending on the Person selected in the ComboBox above it.
Something like:
<ComboBox x:Name="MyComboBox" ItemsSource="{Binding People}"/>
<ListBox ItemsSource="{Binding Element=MyComboBox, Path=SelectedItem.Friends}"/>
It doesn't work (null reference, I'm assuming because the SelectedItem.Friends is the wrong syntax.
Any pointers?

Maybe someone can figure out this issue.
I downloaded a working example of a DataGrid Combobox and confirmed that it worked. I basically copied the template into my application, but it's not working totally correct. I can't find the difference in my code that is causing the problem.
1. The values are bound correct in the combobox, but when I click twice, the drop down box appears, but the value nulls out. In the working example, the value stays in the box. What is causing this?
2. When I change the value, the value selects OK. But, when I click again (to save), I get a 'Two-Way Binding requires Path or XPath' exception. The thing is there is no Path or XPath statement in the working example code. What is
causing this error?
Sutton

What I am wanting to do seems fairly simple, but WPF doesn't seem to like it. Basically I am binding a ComboBox's SelectedValue to my object:
<ComboBox
SelectedValue="{Binding
SendToBinLocation}"
Name="cboToBin"
Width="100"
DisplayMemberPath="BinLocation"
SelectedValuePath="BinLocation"
ItemsSource="{Binding
ToBinList,
RelativeSource={RelativeSource
FindAncestor,
AncestorType={x:Type
UserControl}}}"
BorderBrush="{Binding
Path=SendToBinLocation,
Converter={StaticResource
MissingBinConverter},
Mode=OneWay}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock
FontSize="16"
Text="{Binding
BinLocation}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
This works fine. However, I am wanting to specify a default value for the combobox in the event ToBinLocation is empty or null. I can achieve this by hard-coding in FallBackValue=somevalue, but this is not what I want to do. What I would like to do
is bind the FallBackValue to another property of the object. You can't databind to fallBackValue because it is a dependency property, so how would I go about specifying the FallBackValue with another property on the object? The idea here is that if the SendToBinLocation
is null or empty, the Comboxvalu

I have a datagrid and his columns binds well to its collection data. But when I add a new data column (ie. DataGridTextColumn or DataGridComboBoxColumn) and Bind to the main Data Context of window the data are missing (dont show)

In this sample, The last two columns of DataGrid dont bind to the main data.

i have requirement that, datagrid has a two column one is text column and other is combo box, combo box contain 2 column including checkbox. once i click the checkbox in combobox, resepective first column value need to display in combo box selected
item and second column values need to display in first column of the data grid.

I have a combobox that has a datacontext set to a 'Customer Type' that is a customer CRUD window in WPF that itself has a datacontext of 'Customer' - when i scroll through my customer table entries that have been populated into a listbox,
all of the corresponding textboxes on my CRUD window update to reflect the values stored in the Customer table except the combobox. If I change the datacontext of the combobox to be 'Customer' the text updates correctly when scrolling through but the
dropdown contents are now duplicated to match the number of records. So my problem is this;

How can I display the itemssource as the 'Customer Type.Customer_Type' datacontext, but display the Text as 'Customer.Customer_Type'?

The closest i could compare it to would be a winforms example of setting the combo's DataSource to 'Customer_Type' on the combo with a displaymember of 'Customer_Type' and then making the DataBindings 'Text' property of the combo to be 'Customer.Customer_Type'
so it displays the value stored in customer but as soon as you drop it down it shows non-repeated values that are contained in customer_type.customer_type.

Right now in wpf if the datacontext is customer, the combo displays customer_type as follows: