Search by search of rows in UltraWinGrid turns out slow. Is in UltraWinGrid standard means of search? Whether it is possible associate a row in DataSet which is DataSource of UltraWinGrid?
For example,
row = dataset.Tables [0].Rows [5];
ultraGrid. ActivateRow = row.
If looping through the rows in the grid is slow, there could be any number of reasons for this. It could be that your code is just not written efficiently, or it could be that the data source is slow at retrieving the records, or it could be an issue where it's just not possible to loop any faster. It's impossible to guess without knowing more about exactly what you are doing, what your data source, what you are searching for, and how you are doing it.
There's a method on the Rows collection called GetRowWithListIndex which you can use if you know the Index of the row in your data source.
Here a code example:
private bool recursRow(UltraGridRow row, string value) { bool flag = false; foreach (UltraGridChildBand childBand in row.ChildBands) { foreach (UltraGridRow childRow in childBand.Rows) { foreach (UltraGridCell cell in childRow.Cells) { if (cell.Text.ToLower().IndexOf(value.ToLower(), 0) > -1) { ultraGrid.Focus(); ultraGrid.ActiveCell = cell; cell.Selected = true; cell.Row.ParentRow.Expanded = true; flag = true; break; } } if ((!flag)&&(childRow.ChildBands != null)) { flag = recursRow(childRow, value); } else if (flag) { return flag; } } } return flag; }
Works slowly when in DataSource 15 thousand records.
When I search in DataSet works quickly even with 15 thousand records:
for(int t = 0; t < dsSource.Tables.Count; t++) { for(int r = 0; r < dsSource.Tables[t].Rows.Count; r++) { for (int c = 0; c < dsSource.Tables[t].Columns.Count; c++) { if (dsSource.Tables[t].Rows[r][c].ToString().ToLower().IndexOf(value.ToLower(), 0) > -1) { flag = true; break; } } if (flag) break; } if (flag) break; }
Therefore I want comparing the found row in DataSet with a row in UltraWinGrid