all groups > dotnet windows forms databinding > january 2005 >
You're in the

dotnet windows forms databinding

group:

DataReader to DataGrid (WinForm app)


DataReader to DataGrid (WinForm app) ALI-R
1/21/2005 11:29:22 AM
dotnet windows forms databinding:
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

Re: DataReader to DataGrid (WinForm app) Miha Markic [MVP C#]
1/22/2005 2:21:19 PM
Hi,

No, DataGrid needs a datasource, such as a DataTable.
The easiest way would be to fill a DataTable using DataAdapter and attach
that table to grid.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com

[quoted text, click to view]

AddThis Social Bookmark Button