AD
Administrator
Syncfusion Team
November 21, 2005 10:11 AM UTC
You could use the GridFindReplaceDialogSink support to do this or you could use the DataView.Find support. But it is straight forward and very efficient to just loop through the underlying data list and testing the first character in the entry. There are some possible details you may need to handle. If you are using foreign key columns for example, you have to decide whether you are searching the raw (valuemember) data or the display data. If you have specially formatted columns like DataTime columns, what do you need to search there? In these cases, you can search the FormattedText member to look at this display text.
Here is a sample showing the two different search techniques. One juts searches the raw data in the underlying list. This is fast. The other searches the display text from the grid. This is slower. If your lists are of order 1000 items, then it does not matter which one you use. But if your lists are much larger, then directly using the underlying list is probably 10 times faster. (You could use both searching techniques - using the slow one only when you need the formatted value).
http://www.syncfusion.com/Support/user/uploads/GDBG_TypeTo_8c712c04.zip