G
Guest
Hello:
Does anyone know how I can create a multi-column listbox in VB.Net
(Windows)...I am using VS.Net 2003.
If there is another control available that can be databound with multiple
columns, I would be interested in looking into that as well.
Here is the code I have (it cannot display multiple columns)...
Dim strSQL_Connect As String
Dim strSQL As String
strSQL_Connect = "Persist Security Info=False;User ID=sa;Initial
Catalog=Citywide;Data Source=(local)"
Dim conDatabase As New
System.Data.SqlClient.SqlConnection(strSQL_Connect)
conDatabase.Open()
Dim proLocation As New
System.Data.SqlClient.SqlCommand("proFindFileNames", conDatabase)
proLocation.CommandType = System.Data.CommandType.StoredProcedure
proLocation.Parameters.Add("@OrderBy1",
System.Data.SqlDbType.VarChar, 50).Value = "templist.Files"
proLocation.Parameters.Add("@OrderBy2",
System.Data.SqlDbType.VarChar, 50).Value = ""
proLocation.Parameters.Add("@OrderBy3",
System.Data.SqlDbType.VarChar, 50).Value = ""
proLocation.Parameters.Add("@OrderBy4",
System.Data.SqlDbType.VarChar, 50).Value = ""
proLocation.Parameters.Add("@OrderBy5",
System.Data.SqlDbType.VarChar, 50).Value = ""
proLocation.Parameters.Add("@OrderBy6",
System.Data.SqlDbType.VarChar, 50).Value = ""
proLocation.Parameters.Add("@OrderBy7",
System.Data.SqlDbType.VarChar, 50).Value = ""
proLocation.Parameters.Add("@Company",
System.Data.SqlDbType.VarChar, 50).Value = "1"
Dim adpDatabase As New SqlClient.SqlDataAdapter(proLocation)
Dim dstDatabase As New DataSet
adpDatabase.Fill(dstDatabase)
Me.lstRECORDS.DataSource = dstDatabase.Tables(0)
Me.lstRECORDS.ValueMember = "fldAIM_ID"
Thank you!
Does anyone know how I can create a multi-column listbox in VB.Net
(Windows)...I am using VS.Net 2003.
If there is another control available that can be databound with multiple
columns, I would be interested in looking into that as well.
Here is the code I have (it cannot display multiple columns)...
Dim strSQL_Connect As String
Dim strSQL As String
strSQL_Connect = "Persist Security Info=False;User ID=sa;Initial
Catalog=Citywide;Data Source=(local)"
Dim conDatabase As New
System.Data.SqlClient.SqlConnection(strSQL_Connect)
conDatabase.Open()
Dim proLocation As New
System.Data.SqlClient.SqlCommand("proFindFileNames", conDatabase)
proLocation.CommandType = System.Data.CommandType.StoredProcedure
proLocation.Parameters.Add("@OrderBy1",
System.Data.SqlDbType.VarChar, 50).Value = "templist.Files"
proLocation.Parameters.Add("@OrderBy2",
System.Data.SqlDbType.VarChar, 50).Value = ""
proLocation.Parameters.Add("@OrderBy3",
System.Data.SqlDbType.VarChar, 50).Value = ""
proLocation.Parameters.Add("@OrderBy4",
System.Data.SqlDbType.VarChar, 50).Value = ""
proLocation.Parameters.Add("@OrderBy5",
System.Data.SqlDbType.VarChar, 50).Value = ""
proLocation.Parameters.Add("@OrderBy6",
System.Data.SqlDbType.VarChar, 50).Value = ""
proLocation.Parameters.Add("@OrderBy7",
System.Data.SqlDbType.VarChar, 50).Value = ""
proLocation.Parameters.Add("@Company",
System.Data.SqlDbType.VarChar, 50).Value = "1"
Dim adpDatabase As New SqlClient.SqlDataAdapter(proLocation)
Dim dstDatabase As New DataSet
adpDatabase.Fill(dstDatabase)
Me.lstRECORDS.DataSource = dstDatabase.Tables(0)
Me.lstRECORDS.ValueMember = "fldAIM_ID"
Thank you!