Listbox Multicolumn Vs Datagrid

Z

zoneal

Hi I have a form with a listbox, two comboboxes and two Radiobuttons.
What I want to do is make a selection from both comboboxes and either
Radiobutton and display these three elements across the top of the
listbox eg. 5, 10, 'Go'

As I need multiple rows of data I have a button to 'Load' this to the
listbox. I'm stuck though as I'm having difficulty loading this
correctly. Question: Woulkd I be better off with a datagrid for this
job, and if so, would I need to use dataview. If it is easy using the
listbox, I'm in need of some guidance

Private Sub RadioButton1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles RadioButton1.Click

Dim first, Second As String

If RadioButton1.Checked = True Then

first = "Go"

ElseIf RadioButton2.Checked = True Then

Second = "Stop"

End If

End Sub

Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load

ComboBox1.Items.Add(5)

ComboBox1.Items.Add(10)

ComboBox1.Items.Add(15)

ComboBox1.Items.Add(20)

ComboBox1.Items.Add(25)

ComboBox1.Items.Add(30)

ComboBox2.Items.Add(1)

ComboBox2.Items.Add(2)

ComboBox2.Items.Add(3)

ComboBox2.Items.Add(4)

ComboBox2.Items.Add(5)

ComboBox2.Items.Add(6)

End Sub
 
C

Cor Ligthert

Hi Zone,

Please splits your problems up in for a newsgroup answerable small parts.

The answer is simple, there is basically not a Multicolumn listbox in the
way as I think you describe it.
A multicolumn listbox is an horizontal listbox where a non multicolumn
listbox is a vertical listbox.

When you want to edit data, than in my opinion probably the datagrid will be
your best choose.
When you only want to show data than in my opinion probably the dataview is
your best choose.

I hope this helps

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top