This example demonstrates how to add Incremental Search into GridControl.
Our GridControl doesn't have Incremental Search. To provide this functionality, we subscribe to the GridControl's PreviewTextInput event. When PreviewTextInput is raised, we add the entered value to a searching string. Then, we iterate through all cells in a selected column. If a cell value starts with the searching string, we remember a row handle of this cell. To move to the previous or next row that starts with the searching string, we iterate through all previous or next cells of the current column and change the FocusedRowHandle value to a row handle of a found cell. To highlight the matching string of a cell, we cast InplaceBaseEdit to the InplaceBaseEdit interface and set the HighlightedText property to the searching string value.
Question Comments
Added By: Ankur Jain 7 at: 9/2/2016 6:45:51 AM Hi,
I am trying to use the below implementation since my application is still using version 15.1.
However in the Grid_PreviewTextInput event handler the SearchString is always null.
Can you guide me where I am going wrong.
it will be better if you can provide me with a sample project where incremental search is working using the behavior .
Thanks. Added By: Ivan (DevExpress Support) at: 9/2/2016 1:07:31 PM
Hello,
I've created a separate ticket on your behalf (T422709). It has been placed in our processing queue and will be answered shortly.