ToolTip specifies the tooltip to display when the mouse is hovered over the associated summary result. Note that you can specify a string value as a value for this property.
Imports Infragistics.Windows Imports Infragistics.Windows.Editors Imports Infragistics.Windows.DataPresenter Private Sub Window1_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) ' Set the data source. _dp.DataSource = _dataSource Dim summaryDef1 As SummaryDefinition = _dp.FieldLayouts(0).SummaryDefinitions.Add( _ "PriceAverage", SummaryCalculator.Average, "Price") ' All summary results associated with this summary definition will use this ' tool-tip. summaryDef1.ToolTip = "Price Average" ' Add a second summary that gets used in dp_SummaryResultChanged below. Dim summaryDef2 As SummaryDefinition = _dp.FieldLayouts(0).SummaryDefinitions.Add( _ "PriceTotal", SummaryCalculator.Sum, "Price") End Sub ' If the tool-tip needs to be based on the summary result value, you can ' set the ToolTip on the SummaryResult object itself. For that hook into ' SummaryResultChanged event and set the ToolTip on the SummaryResult object ' based on the calculated result value. Private Sub Dp_SummaryResultChanged(ByVal sender As Object, ByVal e As Infragistics.Windows.DataPresenter.Events.SummaryResultChangedEventArgs) Dim result As Object = e.SummaryResult.Value If e.SummaryResult.SummaryDefinition.Key = "PriceTotal" Then e.SummaryResult.ToolTip = String.Format("Price Total is {0:c}", result) End If End Sub
using Infragistics.Windows; using Infragistics.Windows.Editors; using Infragistics.Windows.DataPresenter; public void Window1_Loaded( object sender, RoutedEventArgs e ) { _dp.DataSource = _dataSource; SummaryDefinition summaryDef1 = _dp.FieldLayouts[0].SummaryDefinitions.Add( "PriceAverage", SummaryCalculator.Average, "Price" ); // All summary results associated with this summary definition will use this // tool-tip. summaryDef1.ToolTip = "Price Average"; // Add a second summary that gets used in dp_SummaryResultChanged below. SummaryDefinition summaryDef2 = _dp.FieldLayouts[0].SummaryDefinitions.Add( "PriceTotal", SummaryCalculator.Sum, "Price" ); } // If the tool-tip needs to be based on the summary result value, you can // set the ToolTip on the SummaryResult object itself. For that hook into // SummaryResultChanged event and set the ToolTip on the SummaryResult object // based on the calculated result value. public void dp_SummaryResultChanged( object sender, Infragistics.Windows.DataPresenter.Events.SummaryResultChangedEventArgs e ) { object result = e.SummaryResult.Value; if ( e.SummaryResult.SummaryDefinition.Key == "PriceTotal" ) { e.SummaryResult.ToolTip = string.Format( "Price Total is {0:c}", result ); } }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2