What exactly I was looking for is to watch the data in a tabular format. In order to achieve this I,ve written an extension method for IDataView
object below which will convert the data into a DataTable
Extension
public static class DataViewHelper
{
public static DataTable ToDataTable(this IDataView dataView)
{
DataTable dt = null;
if (dataView != null)
{
dt = new DataTable();
var preview = dataView.Preview();
dt.Columns.AddRange(preview.Schema.Select(x => new DataColumn(x.Name)).ToArray());
foreach (var row in preview.RowView)
{
var r = dt.NewRow();
foreach (var col in row.Values)
{
r[col.Key] = col.Value;
}
dt.Rows.Add(r);
}
}
return dt;
}
}
Usage
var table= dataView.ToDataTable();
If you now debug the variable table
, you could use the in-built DataTable Visualizer of visual studio to see the data