see the code below. I have a non-editable first "type"-column and depending on that column I choose an editor.
You'll also need to look into context.getEditField() to always return a TextItem (?) for your 1st column and sth similar to my code for your second column:
Code:
setEditorCustomizer(new ListGridEditorCustomizer() { public FormItem getEditor(ListGridEditorContext context) { String firstField = context.getEditedRecord().getAttributeAsString("firstField"); if (firstField.equals("selectYesNo")) { return new SelectItemYesNo(); } else if (firstField.equals("bigfield") { return new TextAreaItem(); } else { return new TextItem(); } } });
Best regards
Blama
Leave a comment: