Why does iterating through the rows in the grid take so long like in this example. It can take a few minutes to walk through every row in the grid if it contains 10000+ rows. Is there a more efficient way to walk the rows. I am trying to implement a find within a column functionality, but it is extremely slow for a large number of rows.
for (int i = 0; i < Global.MainUiForm.OutputGrid.RowCount; i++)
{
currentRow =
Global.MainUiForm.OutputGrid.MasterGridViewInfo.Rows[i];
radColumn = (
RadColumn)this.comboBoxLookIn.SelectedItem;
if (regex.IsMatch(currentRow.Cells[radColumn.FieldName].Value.ToString()))
{
currentRow.IsCurrent =
true;
currentRow.EnsureVisible();
currentRow.Cells[radColumn.FieldName].EnsureVisible();
found =
true;
break;
}
}