I am trying to display the stored value of a previously selected item using a combobox. To put it as simply as possible I have a status table which holds the following values
1, proposed
2, accepted
3, denied
When the user is first entering a record they will select one of the statuses displayed in the combobox, then the system will save the numeric value of that item in a table in my database. Then later in time someone will review the proposed item and change the selected value to whichever is appropriate.
If someone selects a value I can store it no problem. the problem rises when someone goes in and reviews a record. I can either get the previously selected value and not display it. (ie I can store the 1 for proposed but the combobox displays an empty string) or I can display the text value of the previously selected item and not have the actual value of the selected item. (ie, display "proposed" in the combobox but the selected value = 0)
Can someone explain to me how I can have my displayed text and my selected value both be correct using vb.net? I have the code I've been trying to get to work below.
Open in new window