Search code examples
c#winformsdevexpressxtragridincremental-search

How to simulate a column header click in devexpress xtraGrid?


Hi I have a devexpress grid on the form. I enable the incremental search on one of the columns. But I find I need to click the column header each time when I perform one search. Is there a way to simulate such header or column click in grid control?

I also try in gridcontrol_keydown event to set the focused row, but this one only works for once, after performing one search, I need to click the column header or the column again, otherwise the incremental search doesn't work anymore.

Thanks!


Solution

  • The column (or cell) click is required only to set focus to the column under which you want to search data. It is possible to focus a column programmatically. Use the ColumnView.FocusedColumn property.