private void populateScreenFromData(ConsultantProcedureCategoryVoCollection record) { form.dyngrdMain().getRows().clear(); if (record == null || record.size()==0) { engine.showMessage("No records where found ", "Information", MessageButtons.OK, MessageIcon.INFORMATION); return; } for (int i = 0; i < record.size(); i++) { ConsultantProcedureCategoryVo cpc = record.get(i); if (cpc != null) { DynamicGridRow rowCons = addConsultantToGrid(cpc.getPerformingHCP()); rowCons.setValue(cpc); CategoryProceduresVoCollection categoryProcedures = cpc.getCategoryProcedures(); if (categoryProcedures != null) { for (int j = 0; j < categoryProcedures.size(); j++) { CategoryProceduresVo categoryProceduresVo = categoryProcedures.get(j); DynamicGridRow rowCat = addCategoryToGrid(rowCons, categoryProceduresVo.getCategory()); rowCat.setValue(categoryProceduresVo); ProcedureLiteVoCollection procedures = categoryProceduresVo.getProcedures(); if (procedures != null) { for (int k = 0; k < procedures.size(); k++) { addProcedureToGrid(rowCat, procedures.get(k)); } } } rebindAllGridComboBoxes(rowCons); } } } }