J
Joe
Not sure what group this question is better suited for so I sent it to both.
I have a DataTable which contains 1545 rows. I have a method that returns a
DataTable of distinct rows based on one column. This table ends up with 386
rows.
I need to loop through the smaller table and filter a DataView based on each
row from this table.
This loops takes ~5 secs. Is there anyway to improve this?
DataTable dt = SelectDistinctValues(...); // returns a table with 386 rows
foreach (DataRow dr in dt.Rows)
{
dv.RowFilter = string.Format("value = '{0}'", dr[0].ToString() );
foreach (DataRowView drv in dv)
{
...
}
}
I have a DataTable which contains 1545 rows. I have a method that returns a
DataTable of distinct rows based on one column. This table ends up with 386
rows.
I need to loop through the smaller table and filter a DataView based on each
row from this table.
This loops takes ~5 secs. Is there anyway to improve this?
DataTable dt = SelectDistinctValues(...); // returns a table with 386 rows
foreach (DataRow dr in dt.Rows)
{
dv.RowFilter = string.Format("value = '{0}'", dr[0].ToString() );
foreach (DataRowView drv in dv)
{
...
}
}