T
Tony Johansson
Hello!
I have a table in the database that have two kolumns these are
pkid and name.
In the combobox I have set displaymember to name and valuemember to pkid.
This works good. So if a use comboboxName.SelectedValue I get the pkid that
match the displayed name.
To be able to solve a problem I have to get the name that is displayed in
the combobox.
In pseudocode I would like to do this "string selectedName =
comboboxName.DisplayedText;"
As an alternative I can fetch the name from the database because I have the
primary key
but I hope I can get it without using a select query
//Tony
I have a table in the database that have two kolumns these are
pkid and name.
In the combobox I have set displaymember to name and valuemember to pkid.
This works good. So if a use comboboxName.SelectedValue I get the pkid that
match the displayed name.
To be able to solve a problem I have to get the name that is displayed in
the combobox.
In pseudocode I would like to do this "string selectedName =
comboboxName.DisplayedText;"
As an alternative I can fetch the name from the database because I have the
primary key
but I hope I can get it without using a select query
//Tony