/// <summary> /// Creates the hyperlink column. /// </summary> /// <param name="prop">The prop.</param> /// <param name="dataItem">The data item.</param> /// <param name="column">The column.</param> /// <returns></returns> private TableCell CreateHyperlinkColumn(PropertyDescriptor prop, object dataItem, HyperlinkColumn column) { var strNavigationUrl = prop.GetValue(dataItem).ToString(); strNavigationUrl = string.Format(column.NavigationUrlFormatString, strNavigationUrl); strNavigationUrl = this.ResolveClientUrl(strNavigationUrl); var a = new HyperLink() { Text = prop.GetValue(dataItem).ToString() }; a.NavigateUrl = strNavigationUrl; a.Target = column.Target; var cell = new TableCell(); cell.Controls.Add(a); if (column.Width.HasValue) { cell.Width = column.Width.Value; } return(cell); }
/// <summary> /// Creates the hyperlink column. /// </summary> /// <param name="prop">The prop.</param> /// <param name="dataItem">The data item.</param> /// <param name="column">The column.</param> /// <returns></returns> private TableCell CreateHyperlinkColumn(PropertyDescriptor prop, object dataItem, HyperlinkColumn column) { var strNavigationUrl = prop.GetValue(dataItem).ToString(); strNavigationUrl = string.Format(column.NavigationUrlFormatString, strNavigationUrl); strNavigationUrl = this.ResolveClientUrl(strNavigationUrl); var a = new HyperLink() { Text = prop.GetValue(dataItem).ToString() }; a.NavigateUrl = strNavigationUrl; a.Target = column.Target; var cell = new TableCell(); cell.Controls.Add(a); if (column.Width.HasValue) { cell.Width = column.Width.Value; } return cell; }