Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Browsing datareader results
Message
De
21/08/2008 14:45:31
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01339462
Message ID:
01340897
Vues:
10
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform