View Full Version : Programmatic ComboBox.expand() yields previous subset values

24 Feb 2012, 12:39 PM
I have a combo-box box in a grid where I expand the combo box when editing starts (see attached code).

If you do type-ahead selection (as shown in the first diagram) the drop-down will shrink just to the values that meet the type ahead criteria (in this case just red, since that is the only value in the drop-down that starts with 'r').

Now if I select on a different row's color, red is the only option (see second screenshot).

If I don't do the expand, everything works fine.

How I expand is as shown. If I try different Schedule commands, they all have the same behavior. This seems to be the one that works the best (others tend to flicker the drop-down in the upper left corner of the browser).

editor.addBeforeStartEditHandler(new BeforeStartEditHandler<Item>() {
public void onBeforeStartEdit(BeforeStartEditEvent<Item> event) {
currentRow = datastore.get(event.getEditCell().getRow());
if (event.getEditCell().getCol() == 1) {
Scheduler.get().scheduleEntry(new ScheduledCommand() {
public void execute() {