Hi. I am using the gridcontrol to display a large amount of data. The user must be able to incrementally search through the data for text entered in the search textbox. The problem is that since there are so many rows, it is possible that the search may take a very long time and so the user must be able to abort the search...
I am using the gridcontrol find function shipped with syncfusion. I have attempted to run the find in a seperate thread so that the search window remains responsive, but I guess a long search takes up too many cycles and the window containing the "abort" button is still totally unresponsive.
In this forum thread, there is a sample that shows an alternative method for searching the grid. The main reason that that the default implementation is slow is that it uses a method that triggers events (QueryCellInfo) to retrieve cell values.
If you directly use such a technique, then you will have control of the loop and could check if the process should be cancelled.
Here is code similar to that used in the sample that avoid events. Using an indexer to retrieve grid[row, col].CellValue triggers events (like QueryCellInfo). You can avoid triggerring these events (which slow things down) by accessing the GridData directly.
GridStyleInfoStore store = grid.Data[rowIndex, colIndex];
if (store != null)
style = new GridStyleInfo(store);
style = new GridStyleInfo();
object cellValue = style.CellValue;