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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Interrupting the "find" grid

Thread ID:

Created:

Updated:

Platform:

Replies:

19878 Oct 5,2004 04:54 PM UTC Oct 5,2004 06:52 PM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On October 5, 2004 04:54 PM UTC

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 06:52 PM UTC

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);
else
	style = new GridStyleInfo();

object cellValue = style.CellValue;

CONFIRMATION

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.

Warning Icon 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.Close Icon

;