如何使用下面列出的foreach代码将DataViewGrid的光标移动到下一行?
foreach (DataGridViewRow row in dt.Rows)
{
sourceFolder = @"I:\Testing\2010\Data\";
sourceFile = sourceFolder + row.Cells["File Name"].Value;
if (File.Exists(sourceFile))
{
fileNo += 1;
tempFile = outputFolder + "TEMP" + fileNo.ToString().PadLeft(4, '0') + ".TXT";
if (File.Exists(tempFile))
{
File.Delete(tempFile);
}
row.Cells["Flag"].Value = "X";
}
}