binding a datagrid to a datareader

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2004
Posts: 3
Reputation: afzalhassen is an unknown quantity at this point 
Solved Threads: 2
afzalhassen afzalhassen is offline Offline
Newbie Poster

binding a datagrid to a datareader

 
0
  #1
Aug 29th, 2004
Hi,

i'm trying to make use of sqldataconnections/commands&readers to populate
a datagrid..the msdn collection lib. hasnt been much help at all in this regard

In addition to binding to the datagrid, i also want to be able to make use of the datagrids ability to update the data to which it is bound by editing the data in the grid, i need to accomlish this through the use of a datareader as well..
any help in this regard will be much appreciated...

thanx alot in advance...

Afzal Hassen
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 898
Reputation: Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light 
Solved Threads: 27
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend

Re: binding a datagrid to a datareader

 
0
  #2
Sep 3rd, 2004
DataGrid1.DataSource = yourdatareader;
DataGrid1.DataBind();
-Ryan Hoffman

.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 1
Reputation: Billy_K is an unknown quantity at this point 
Solved Threads: 0
Billy_K Billy_K is offline Offline
Newbie Poster

Re: binding a datagrid to a datareader

 
0
  #3
Oct 4th, 2004
A datareader is a read-only object. If you need to edit and update changes you need to use a dataset
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC