private void populateECGFromGrid(RACPPastMedicalHistoryVo pastMedicalHistoryVo) { ECGFindingsCollection collECGFindings = new ECGFindingsCollection(); for (int i = 0; i < form.grdRestingECG().getRows().size(); i++) { grdRestingECGRow row = form.grdRestingECG().getRows().get(i); if(row.getcolSelect()) collECGFindings.add(row.getValue()); } if(collECGFindings.size()>0) pastMedicalHistoryVo.setECGFindings(collECGFindings); else pastMedicalHistoryVo.setECGFindings(null); }