PC Review


Reply
Thread Tools Rate Thread

Datareader to a DataGrid on a WINFORM

 
 
ALI-R
Guest
Posts: n/a
 
      21st Jan 2005
Hi All,

Is there really a way of binding a DataReader to a Datagrid in a Windows
Forms Application?.I know that in ASP.NET ,you just simply set the
datasource and call DataBind() method.

Thanks


 
Reply With Quote
 
 
 
 
W.G. Ryan eMVP
Guest
Posts: n/a
 
      21st Jan 2005
No, not without walking through it and then building a bindable object and
binding it to that. You don't gain much though even if you could b/c all of
that data would have to be persisted in order for the grid to hold it - so
you woudln't be saving memory or anything.

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"ALI-R" <(E-Mail Removed)> wrote in message
news:%231Qos9%23$(E-Mail Removed)...
> Hi All,
>
> Is there really a way of binding a DataReader to a Datagrid in a Windows
> Forms Application?.I know that in ASP.NET ,you just simply set the
> datasource and call DataBind() method.
>
> Thanks
>
>



 
Reply With Quote
 
Sahil Malik
Guest
Posts: n/a
 
      22nd Jan 2005
Ali,

Bill is right, datareaders aren't directly bindable.

Here's a good and easy example though --
http://dotnetjunkies.com/WebLog/sahi.../11/36078.aspx


- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik


"ALI-R" <(E-Mail Removed)> wrote in message
news:%231Qos9%23$(E-Mail Removed)...
> Hi All,
>
> Is there really a way of binding a DataReader to a Datagrid in a Windows
> Forms Application?.I know that in ASP.NET ,you just simply set the
> datasource and call DataBind() method.
>
> Thanks
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set the datagrid with datasoure from datareader Cylix Microsoft VB .NET 1 19th Apr 2007 11:16 AM
DataGrid and DataReader Max Microsoft ADO .NET 5 13th Apr 2005 03:35 AM
Datagrid and datareader Bart Schelkens Microsoft ASP .NET 7 28th Jul 2004 09:35 AM
DataReader -> Datagrid Rikki Microsoft C# .NET 1 27th Mar 2004 02:32 PM
Datareader to Datagrid BC Microsoft ASP .NET 1 23rd Jan 2004 07:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:51 AM.