static IControl GetFormRow(String eventName, String formName, out IControl formCell) { formCell = null; String identifier = String.Empty; try { if (ExpandEvent(eventName, out identifier) && !String.IsNullOrEmpty(identifier)) { ReadOnlyCollection <IControl> rows = DL_CRF_PDEP_EventsPage.GetRowsEventRows(identifier); foreach (IControl row in rows) { if (Control_PropertyUtilities.IsControlVisible(row)) { formCell = WebTableUtilities.GetCell(row, 2); String formText = Control_PropertyUtilities.GetText(formCell); if (formName.Equals(formText, StringComparison.InvariantCultureIgnoreCase)) { return(row); } } } } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(null); }