开发者

Effective auto-complete for WinForms DataGridViewComboBoxColumn

I've build a number of WinForms applications that use DataGridView grids with combo box columns. There seems to be a basic flaw in the user interaction for these controls. Typically my audience is made up of business users who what to perform keyboard driven layout, and they expect auto complete selection when they encounter a dropdown co开发者_开发问答ntrol.

I've seen 2 basic problems with this control type:

  1. When the control gets the focus as a tabstop, it doesn't immediately go into auto complete mode, and the user has to fiddle, usually by hitting a space or a couple of keystrokes.
  2. Sometimes the control appears to have an auto-complete selection, but when the tab is hit the selection clears. This is definitely a problem is you have 2 controls in a row within a grid.

I know that one solution is to use a different control library. Before long I expect to be doing live projects with WPF, but there will still be WinForm maintenance for years to come. I've tried many tweaks to the auto-complete and dropdown style settings, but I've never come up with a configuration that really works for poweruser level keyboard based data entry.

Any suggestions?


Well, for the 1st problem, are you setting DataGridView.EditMode to DataGridViewEditMode.EditOnEnter?

As for the 2nd, if the out of the box editing control for the ComboBox column isn't doing what you want, you can always roll your own using the IDataGridViewEditingControl interface.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜