private void populateTreatmentGrid(PlinthWorkTreatmentVoCollection voTreatColl) { if(voTreatColl!= null) { GenForm.grdTreatmentRow row; for(int y=0; y<voTreatColl.size(); y++) { PlinthWorkTreatmentVo voTreat = voTreatColl.get(y); int t =0; for(t=0; t<form.grdTreatment().getRows().size(); t++) { row = form.grdTreatment().getRows().get(t); if(row.getColTreatment().equals(voTreat.getTreatment())) { row.setColTreatment(voTreat.getTreatment()); row.setColComments(voTreat.getDetails()); break; } } if(t == form.grdTreatment().getRows().size()) { row = form.grdTreatment().getRows().newRow(); row.setValue(voTreat); row.setColTreatment(voTreat.getTreatment()); row.setColComments(voTreat.getDetails()); } } } }