private DynamicGridRow getRowByDepartment(DepartmentType departmentType) { if(departmentType == null) return null; for(int i=0; i<form.dyngrdDepartments().getRows().size(); i++) { if(departmentType.equals(form.dyngrdDepartments().getRows().get(i).getValue())) return form.dyngrdDepartments().getRows().get(i); } return null; }