This is a migrated thread and some comments may be shown as answers.

Binding a DbDataReader

1 Answer 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nicole
Top achievements
Rank 1
Nicole asked on 27 Feb 2012, 12:15 PM
Hi,

I want to bind a DbDataReader (System.Data.Common) to my GridView.

I tried to bind it via INotifyPropertyChanged, but this is impossible with the DbDataReader. So I tried the following code:

GridViewMain.ItemsSource = reader;
GridViewMain.Rebind();

But there happens nothing. How can I bind the datareader to the gridview?

I'm using Visual Studio 2008, .NET 3.5 and RadControls_for_WPF35_2011_2_0920

Thank you for any suggestions!

1 Answer, 1 is accepted

Sort by
0
Nicole
Top achievements
Rank 1
answered on 29 Feb 2012, 09:17 AM
Got it via Dataadapter.
Tags
GridView
Asked by
Nicole
Top achievements
Rank 1
Answers by
Nicole
Top achievements
Rank 1
Share this question
or