Answer the question
In order to leave comments, you need to log in
How to read value from combobox?
How to write and read a value from a comboBox in C# WPF
Values are taken from the database (id, name) The name field is displayed in the drop-down list, when you click on it, only id should be selected
How to assign an id, maybe there is something like value or bind, but as?
And how to count the value when fetching
Answer the question
In order to leave comments, you need to log in
The exact answer depends on how and what you linked the combobox to. I usually use normal viewmodels for combobox items, so I bind SelectedItem . In the case of using bindings, the question of reading the value when choosing should not be.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question