How to use gridview

E

enak

I am new to ASP.NET 2.0 and am trying to use the gridview in an application.
I am used to using the datagrid and being able to bind it to a datareader
programmatically.

Is there a way to do that with the gridview? Here is what I have tried but
it is not visible:

sSQL =

"Select c.ClientName, a.lName + ', ' + a.fName + ' ' + a.middleInitial AS
ApplicantName," & _

"a.OrderedBy, a.DateOrdered " & _

"from tblApplicant AS a JOIN tblClient AS c ON a.ClientID = c.ClientID " & _

"Where DatePosted Is null"
dr = cDb.getDataReader(sSQL)


Me.gridNewRequests.DataSource = dr

Me.gridNewRequests.DataBind()

Me.gridNewRequests.Visible = True
cDb.closeConnection()

As you can see I am not using an SQLDataSource. Do you have to use it or can
I do it the way I am?

Please help me with this.

Thanks,

enak
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top