>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