Simple enough. Cant find a simple solution. Not sure if their is a simple solution? :/
I have a dataTable. I essentially want to achieve this…
DataTable dt = new DataTable();
dataAdapter.Fill(dt);
TableRow tr = new TableRow();
tr = dt.Rows[0];
but i cant convert from DataRow to a TableRow!
Help!
Alex
if your goal is to show on the UI the data that are within a dataTable(or any other datasource) why don’t you use a repeater?
anyway you can’t just convert the DataTableRow to TableRow but you have to do it yourself.
have a look at the below code
source:
http://geekswithblogs.net/dotNETvinz/archive/2009/06/24/fill-asp.net-table-with-data-from-datatable.aspx