I am using VB.NET 2010 Pro here at work and can't make this work which does work at home using vb.net 2010 Express.
it also works here at work in ASP.NET 2010 using the same IDE as above (pro).
it is unbound since I want to be able to add different data to it.
I also have a Storedprocedure in SQL getting the data, But there does not seem to be an option to select an SP in the Wizard? even though there is one in ASP.NET in its grid?
So what am I missing? the grid is just a gray square on my form with no columns, headings or no data.
DougP
it also works here at work in ASP.NET 2010 using the same IDE as above (pro).
it is unbound since I want to be able to add different data to it.
I also have a Storedprocedure in SQL getting the data, But there does not seem to be an option to select an SP in the Wizard? even though there is one in ASP.NET in its grid?
So what am I missing? the grid is just a gray square on my form with no columns, headings or no data.
Code:
Public Sub PopulateGrid()
Dim cnn As SqlConnection
cnn = New SqlConnection(gblconnectionString)
Try
cnn.Open()
Dim queryTrans As String
queryTrans = "Select * from Transactions Order by PickupTime DESC;"
Dim daTrans As New SqlDataAdapter
Dim dtTrans As New DataTable
daTrans.SelectCommand = New SqlCommand(queryTrans, cnn)
daTrans.Fill(dtTrans)
DataGridView2.DataSource = dtTrans
DougP