Answer the question
In order to leave comments, you need to log in
How to read a string from an ObservableCollection with given parameters?
There is an ObservableCollection (with fields id, name, date) that works with combobox1 in which only name is displayed.
When changing the value on click in combobox1, you need to get id and date from ObservableCollection, how to do this?
Answer the question
In order to leave comments, you need to log in
In combobox1.SelectedItem you will have a selected object of type CreditsList.
In the simplest case:
public void CreditsList_SelectionChanged(object sender, SelectionChangedEventArgs args)
{
if(combobox1.SelectedItem != null)
MessageBox.Show((combobox1.SelectedItem as CreditsList).credit_id);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question