We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Interrupting the "find" grid

Thread ID:





19878 Oct 5,2004 12:54 PM Oct 5,2004 02:52 PM Windows Forms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On October 5, 2004 12:54 PM

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. Any ideas?

Administrator [Syncfusion]
Replied On October 5, 2004 02:52 PM

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. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=19862 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.
GridStyleInfo style;
GridStyleInfoStore store = grid.Data[rowIndex, colIndex];
if (store != null)
	style = new GridStyleInfo(store);
	style = new GridStyleInfo();

object cellValue = style.CellValue;


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.