public static void AddTooltip(this GridBand gridBand, GetTooltip tooltipGetter) { Debug.Assert(gridBand != null && gridBand.View != null, "gridBand == null || gridBand.View == null "); if (gridBand == null || gridBand.View == null) { return; } gridBand.View.BeginDataUpdate(); try { foreach (BandedGridColumn column in gridBand.Columns) { column.ToolTip = tooltipGetter(column.FieldName); } } catch (Exception ex) { throw ex; } finally { gridBand.View.EndDataUpdate(); } }
public IHtmlString Render() { if (!IsEnabled) { return(MvcHtmlString.Empty); } // Optimism! using (MiniProfiler.Current.Step("Render Tab: " + Name)) { var status = GetMonitorStatus?.Invoke() ?? MonitorStatus.Good; return($@"<a class=""{(IsCurrentTab ? "selected " : "")}{status.GetDescription()}"" href=""{Url }"" title=""{GetTooltip?.Invoke()}"">{(GetText != null ? GetText() : Name) }</a>".AsHtml()); } }