Hi,
I have a list grid and one of the column in list grid has a datasource bound ComboBoxItem. during edits it works great but once user is done editing and hit enter (or use mouse ) to select the value from pick list and if i try to get the record - grid record stay in edit mode and does not return selected value from editor as well.
ListGrid code:
final ListGridField gridSymbolField = new ListGridField("symbol");
gridSymbolField.setEditorType(createLookupItem());
final ListGridField gridNameField = new ListGridField("name");
gridNameField.setCanEdit(false);
grid.setDataSource(detailDataSource);
grid.setAlternateRecordStyles(true);
grid.setEmptyCellValue("-");
grid.setAutoFetchData(true);
grid.setCanEdit(true);
grid.setCanGroupBy(false);
grid.setAutoSaveEdits(false);
// grid.setModalEditing(true);
grid.setEditEvent(ListGridEditEvent.CLICK);
grid.setListEndEditAction(RowEndEditAction.NEXT);
grid.setFields(gridSymbolField , gridNameField);
And lookup item object is:
ListGridField symbolField = new ListGridField("symbol");
ListGridField nameField = new ListGridField("name");
final ComboBoxItem comboBoxItem = new ComboBoxItem();
comboBoxItem.setOptionDataSource(dataSource);
comboBoxItem.setPickListFields(symbolField, nameField);
comboBoxItem.setDisplayField("symbol");
now either i add any listener on ComboBoxItem like ChangedListener or on grid like addEditorExitHandler to get what user has selected from combox's picklist using
ListGridRecord record = comboBoxItem.getSelectedRecord();
This grid stay in edit mode and does not return selected value.
Kindly advice.
I have a list grid and one of the column in list grid has a datasource bound ComboBoxItem. during edits it works great but once user is done editing and hit enter (or use mouse ) to select the value from pick list and if i try to get the record - grid record stay in edit mode and does not return selected value from editor as well.
ListGrid code:
final ListGridField gridSymbolField = new ListGridField("symbol");
gridSymbolField.setEditorType(createLookupItem());
final ListGridField gridNameField = new ListGridField("name");
gridNameField.setCanEdit(false);
grid.setDataSource(detailDataSource);
grid.setAlternateRecordStyles(true);
grid.setEmptyCellValue("-");
grid.setAutoFetchData(true);
grid.setCanEdit(true);
grid.setCanGroupBy(false);
grid.setAutoSaveEdits(false);
// grid.setModalEditing(true);
grid.setEditEvent(ListGridEditEvent.CLICK);
grid.setListEndEditAction(RowEndEditAction.NEXT);
grid.setFields(gridSymbolField , gridNameField);
And lookup item object is:
ListGridField symbolField = new ListGridField("symbol");
ListGridField nameField = new ListGridField("name");
final ComboBoxItem comboBoxItem = new ComboBoxItem();
comboBoxItem.setOptionDataSource(dataSource);
comboBoxItem.setPickListFields(symbolField, nameField);
comboBoxItem.setDisplayField("symbol");
now either i add any listener on ComboBoxItem like ChangedListener or on grid like addEditorExitHandler to get what user has selected from combox's picklist using
ListGridRecord record = comboBoxItem.getSelectedRecord();
This grid stay in edit mode and does not return selected value.
Kindly advice.
Comment