private void addChildRow(TTAMedicationDetailForTTAHistoryVo detail, DynamicGridRow parent) { if (detail == null || parent == null) return; DynamicGridRow child = parent.getRows().newRow(); child.setValue(detail); if (detail.getMedicationIsNotNull() && detail.getMedication().getIsControlledDrugIsNotNull() && detail.getMedication().getIsControlledDrug()) child.setBackColor(ConfigFlag.UI.CONTROLLED_DRUG_COLOR.getValue()); DynamicGridCell cell = child.getCells().newCell(getGridColumn(NAME_IDENTIFIER), DynamicCellType.STRING); cell.setValue(detail.getOtherMedicationTextIsNotNull() ? detail.getOtherMedicationText() : null); //WDEV-14407 //cell.setValue(detail.getMedicationIsNotNull() ? detail.getMedication().getMedicationName() : null); if (detail.getOtherMedicationTextIsNotNull()) { cell.setTooltip(detail.getOtherMedicationText()); } cell.setReadOnly(true); cell = child.getCells().newCell(getGridColumn(DOSE_IDENTIFIER), DynamicCellType.STRING); String detailS = ""; if (detail.getDoseValueIsNotNull()) { detailS += formatFloat(detail.getDoseValue()); // WDEV-13073 if (detail.getDoseUnitIsNotNull()) { detailS += " " + detail.getDoseUnit().getText(); } else if (detail.getUnitTextIsNotNull()) { detailS += " " + detail.getUnitText(); } } cell.setReadOnly(true); cell.setValue(detailS); cell = child.getCells().newCell(getGridColumn(ROUTE_IDENTIFIER), DynamicCellType.STRING); cell.setValue(detail.getRouteIsNotNull() ? detail.getRoute().getText() : null); cell.setReadOnly(true); cell = child.getCells().newCell(getGridColumn(FREQUENCY_IDENTIFIER), DynamicCellType.STRING); cell.setReadOnly(true); cell.setValue(detail.getFrequencyUnitIsNotNull()?detail.getFrequencyUnit().getText():null); cell = child.getCells().newCell(getGridColumn(FORM_IDENTIFIER), DynamicCellType.STRING); cell.setReadOnly(true); cell.setValue(detail.getFormIsNotNull() ? detail.getForm().getText() : null); cell = child.getCells().newCell(getGridColumn(SELECT_IDENTIFIER), DynamicCellType.BOOL); cell.setAutoPostBack(true); }