Cannot get GridView to display Data (VB.Net / VS2008
Posted on 2010-08-20
I cannot get Gridview to show my data. I've tryed using a Datatable and a Oledb Reader. I've verified that both contain the data and the rows.
After the .databind call, i verify that the gridview has all 59 rows, but it doesn't display on the web page. I've already tried turning autogeneratecolumns to true
This is a sub in my default.aspx.vb file, which executes. Note that i've already instantiated the new gridview (Connectdb is a class with all db functions, dbQueryResult returns a datareader)
>>>> CODE <<<<<<
Dim dbConn As New Connectdb
If dbConn.dbConnect Then
sSQL = "Select LastName,FirstName FROM tblEmployees"
Dim dt As DataTable
dt = New DataTable
If dbConn.dbExecQuery(sSQL, gQueryType.ReaderQuery) Then
EmployeeGrid.DataSource = dt
<<<<<<< CODE >>>>>>