Home

[Bug] LinqPad 6, 7 : DataTable Dump() does not show RowError

DataTable Dump() does not show RowError with an red icon in the first column.
This feature has probably been lost during transition betweenversion 5 and 6.
(Sometimes usefull ton quickly find errors in data)

Here's my reproduction code and the screenshots for LP5, 6 and 7.
`void Main()
{
var dt = GetDataSetAndTable();
dt.Dump(Path.GetFileNameWithoutExtension(Util.LINQPadFolder), true);
}

// Local function to create a sample DataTable
DataTable GetDataSetAndTable()
{
var dt = new DataTable();
dt.Columns.AddRange(new DataColumn[] { new DataColumn("Jan", typeof(DateTime)), new DataColumn("Feb", typeof(DateTime)), new DataColumn("Mar", typeof(DateTime)), new DataColumn("Apr", typeof(decimal)) });

var date = DateTime.Today;
for (int i = 0; i < 10; i++)
{
    dt.Rows.Add(date.AddDays(i * 5), date.AddDays(i * 10), date.AddDays(i * 15), i * 11);
    if (i % 2 == 0)
        dt.Rows[i].RowError = "Row error";
    else
        dt.Rows[i].SetColumnError((dt.Columns.Count - 1) % i, "Column error");
}
dt.AcceptChanges();

return dt;

}`


Comments

Sign In or Register to comment.