Hey I have a question about getting an ContactTypeId from the ContactType. This is the object that has an id:
public class ContactType
{
public int ContactTypeId { get; set; }
public string ContactTypeValue { get; set; }
public int ContactId { get; set; }
public DateTime? Added { get; set; }
public DateTime? Updated { get; set; }
public DateTime? Deleted { get; set; }
}
I wrote a WPF application that has a listbox.
<ComboBox x:Name="ContactTypeComboBox" HorizontalAlignment="Left" Margin="110,68,0,0" VerticalAlignment="Top" Width="120" ItemsSource="{Binding ContactTypes}" DisplayMemberPath="ContactTypeValue" SelectedValuePath="ContactTypeId" />
If i get Selected value path doesn't give an ContactTypeId from that object. It only gives a string "ContactTypeId"
Please help me to get a ContactTypeId from ContactType