views:

29

answers:

1

I need to implement a custom search in a grid and I would like to find some user interface guidelines that explain the standard way to implement it.

I mean this kind of search that is initiated by the user using the keyboard. The focus on the grid must move to the first row that match the pressed key.

I would like to find a good algorithm to do it.

Thanks.

A: 

There is no standard way, many grids/lists implement this in different ways and it drives me bonkers. Some only search on the first letter, some search on multiple letters without indicating which ones, others show a (non-modal) window that shows which letters it is currently using, others keep this buffer hidden and use a timeout to reset, other don't reset at all or with a (hidden) key like esc.

From the way you phrase your question it sounds like a simple 'jump to first row that starts with the pressed char' - which is the simplest use case, and I fail to see what the 'algorithm' in this case should do.

If there is a specific application you want to mimic I think you should provide a detailed description of its behavior. Although I think that after making this description, the algorithm will be peanuts.

Roel
My first intention was finding something formal...some guidelines to follow. I didn't find anything so right now I am trying to mimic the algorithm used in Windows Explorer.I have already implemented something I think it works quite similarly but as I have not any algorithm or guidelines I can not be 100% sure I didn't miss anything.
Javier De Pedro