Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Populate a DataGrid - Framework 1.1

Status
Not open for further replies.

Miked811

Programmer
Apr 17, 2005
61
CA
Hi,

Im trying to populate a DataGrid with a DateReader in .NET FrameWork 1.1 and its not happening.

These are only what I can find and it is for .NET Framework 2.

Code:
dgDataGrid.DataSource = myReader
dgDataGrid.DataBind()

or

Code:
Dim source As New BindingSource
source.DataSource = DataReader
DataGrid1.DataSource = source

Do you have some other alternatives for 1.1

Thanks

Mike
 
Miked811,

All you should have to do is like
Code:
Dim MyReader As SqlDataReader = MyCommandObject.ExecuteNonQuery
DataGrid1.DataSource = MyReader
DataGrid1.DataBind

See if this helps

Senior Qik III, ASP.Net, VB.Net ,SQL Programmer

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SELECT * FROM Users WHERE clue > 0
0 Rows Returned

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
I tried that, but I am using VS 2003 (VB NET 2003) .NET FRAMEWORK 1.1 and

DataGrid1.DataBind

is not available, I believe it is available in .NET FRAMEWORK 2 and VB NET 2005. The version we have is only that of 2003.

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top