simplify code in EditorGridPanel