Frage

I have a ComboBox filled with a custom Class called TableHeader, this class contains two propertys, TableName and TableText, i have set the ToString() funktion to return TableText since its what i want to display but how do i get the TableName returned?

War es hilfreich?

Lösung

You can simply cast the selected item back into your TableHeader class, then use it as normal.

Make sure you only add TableHeader instances to the combobox though, otherwise the universe will explode.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top