Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Browsing datareader results
Message
From
21/08/2008 14:45:31
 
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01339462
Message ID:
01340897
Views:
9
>To bind data to a DataGridView we need a DataTable.
>As an example to show your data in a DataGridView,

Thank you.
Your and MSDN sample require to know SQL select statement.
However this is not avaliable in my case.
My method receives an opened datareader.
SQL select statement is not avaliable.
I think I must implement the following:

1. Read column names from datareader using FataReader.GetName()
2. Read first row from datareader to determine column types.
3. Create object with those properties and names using MS Dynamic Linq library.
4. Read whole datareader to fill List object with it contents.
5. Assing result list to DataGridView DataSource.

Any idea how to implement this ?
Andrus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform