Share this blog:

Friday, May 14, 2010

How to use an auto-suggest control instead of a dropdown control in the Grid

Here's time-saving tip number two for you this week. Feeling lucky? Maybe you should buy a lottery ticket on your way home from work tonight.

A popular feature of a dropdown control is that it lets you store an ID value, but display text. For example, in an order items table you store the product ID value, but display the product name. Selecting a product name instead of memorizing an ID value is much easier for the user.

Here's the drawback. The list of choices for the dropdown control has to be loaded when the Grid is loaded. If the list is big, the Grid will not load as fast as you would like. And if the Grid displays multiple rows, the problem gets worse because the list will be downloaded for each row in the Grid.

These two videos show you a technique where you can use an auto-suggest control in place of a dropdown control to achieve the same benefit for the user without any performance degradation. That is, decode the stored value with a human-readable display value.

The auto-suggest control lets the Grid load faster, since the list of choices does not have to be loaded up front. Then when a list of choices is presented to the user, it is pre-filtered based on the characters the user has started to type in the field. Watch the videos and see how Selwyn pulls it off.

Part one


















Part two

0 comments:

Related Posts Plugin for WordPress, Blogger...