J
James P.
Hello,
For my new Windows application, all I want is to create an initial
form to demo to the user to show them how it looks like with some data
on it. So I figure the fastest way is to create some comboBox-es to
show some data on them manually entered in the code without connecting
to the database yet. It should be simple but somehow I can't make it
work.
First, I drag a comboBox from the ToolBox to the form. Then,
double-click the form to go to the code behind page with the Load
event, I tried either:
ComboBox1.Items.AddRange(New Object() {"red", "blue"})
OR
ComboBox1.Items.Add("red")
ComboBox1.Items.Add("blue")
Yet when I ran, it showed nothing on the comboBox, except the word
"comboBox1" (default text property). Any ideas what I am missing,
anybody?
Or if you can tell me how create a comboBox display values from a
database the quickest way.
Thanks,
James
For my new Windows application, all I want is to create an initial
form to demo to the user to show them how it looks like with some data
on it. So I figure the fastest way is to create some comboBox-es to
show some data on them manually entered in the code without connecting
to the database yet. It should be simple but somehow I can't make it
work.
First, I drag a comboBox from the ToolBox to the form. Then,
double-click the form to go to the code behind page with the Load
event, I tried either:
ComboBox1.Items.AddRange(New Object() {"red", "blue"})
OR
ComboBox1.Items.Add("red")
ComboBox1.Items.Add("blue")
Yet when I ran, it showed nothing on the comboBox, except the word
"comboBox1" (default text property). Any ideas what I am missing,
anybody?
Or if you can tell me how create a comboBox display values from a
database the quickest way.
Thanks,
James