I fired a database query and got result in a DataTable.
When I used following sample code, I’m able to retrieve all values from DataTable :
private void LoadList(DataTable res)
{
foreach(DataRow row in res.Rows)
{
foreach (var item in row.ItemArray)
{
Console.WriteLine(item);
}
}
}
How this DataTable can be dynamically passed to ListView in order to display all the elements of DataTable?
Is there any other alternative to ListView to display data from DataTable?
I’m absolute beginner when it comes to using Mono for Android, so any help appreciated.
When using databases, the common way is to use a ContentProvider, get a Cursor and then populate a SimpleCursorAdapter (and even a ViewBinder if you want some customization)
Unless there is a good reason not to use them, I’ll stick to the tools recommended by the platform.