Anthony Matovu
asked on
selecting a combobox item at runtime.
I am using a combBox, I want to select an item at runtime. When the form is loading the combbox is populated with values. At one time I have to populate the form with data from the database. When editing is done on the form it should replace the original form. below is a line from my code.
Me.tlevel.Text = gcl.ReturnLevel(drd("tleve l"))
tlevel is a combobox, drd("tlevel") is a level id from a datareader "drd". actually it the (index of the selected item in the combobox) + 1, so gcl.ReturnLevel(drd("tleve l")) displays the label for that index. But as it is loading I want it also selected because when iam saving i read the (id of the selected item) + 1 and i save that value. i use structures to populate the combobox. I am using vb.net.
Me.tlevel.Text = gcl.ReturnLevel(drd("tleve
tlevel is a combobox, drd("tlevel") is a level id from a datareader "drd". actually it the (index of the selected item in the combobox) + 1, so gcl.ReturnLevel(drd("tleve
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.