Version

Row Property (BeforeDisplayDataErrorTooltipEventArgs)

Returns the row for which the data error tool tip is being displayed.
Syntax
'Declaration
 
Public ReadOnly Property Row As UltraGridRow
public UltraGridRow Row {get;}
Example
The following code shows some of the information available in the BeforeDisplayDataErrorTooltip event.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid


    Private Sub UltraGrid1_BeforeDisplayDataErrorTooltip(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.BeforeDisplayDataErrorTooltipEventArgs) Handles UltraGrid1.BeforeDisplayDataErrorTooltip
        ' You can get the instance of the IDataErrorInfo that provided the UltraGrid
        ' with the error using the DataErrorInfo property.
        Dim dataErrorInfo As System.ComponentModel.IDataErrorInfo = e.DataErrorInfo

        ' You can get the underlying list object using the row's ListObject property.
        Dim listObject As Object = e.Row.ListObject

        ' If the UltraGrid is bound to a DataSet or DataTable then the listObjects 
        ' are instances of DataRowView. You can get the underlying DataRow from it.
        Dim drv As DataRowView = Nothing
        Dim dataRow As DataRow = Nothing
        If TypeOf listObject Is DataRowView Then
            drv = DirectCast(listObject, DataRowView)
            dataRow = drv.Row
        End If

        ' You can modify the tooltip text by setting the TooltipText property.
        If Not Nothing Is e.Column Then
            ' If Column is non-null then the tooltip is being displayed for the
            ' error icon of a cell.
            e.TooltipText = "Cell Data Error Tooltip for " & e.Column.Key & ": " & e.TooltipText
        Else
            ' If the Column is null then the tooltip is being displayed for the 
            ' error icon of a row selector.
            e.TooltipText = "Row Data Error Tooltip: " & e.TooltipText
        End If

        ' You can conditionally prevent the displaying of the tooltip by setting 
        ' the Cancel to true.
        If e.TooltipText.Length > 10000 Then
            e.Cancel = True
        End If
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;


		private void UltraGrid1_BeforeDisplayDataErrorTooltip(object sender, Infragistics.Win.UltraWinGrid.BeforeDisplayDataErrorTooltipEventArgs e)
		{
			// You can get the instance of the IDataErrorInfo that provided the UltraGrid
			// with the error using the DataErrorInfo property.
			System.ComponentModel.IDataErrorInfo dataErrorInfo = e.DataErrorInfo;

			// You can get the underlying list object using the row's ListObject property.
			object listObject = e.Row.ListObject;
			
			// If the UltraGrid is bound to a DataSet or DataTable then the listObjects 
			// are instances of DataRowView. You can get the underlying DataRow from it.
			DataRowView drv = null;
			DataRow dataRow = null;
			if ( listObject is DataRowView )
			{
				drv = (DataRowView)listObject;
				dataRow = drv.Row;
			}
			
			// You can modify the tooltip text by setting the TooltipText property.
			if ( null != e.Column )
			{
				// If Column is non-null then the tooltip is being displayed for the
				// error icon of a cell.
				e.TooltipText = "Cell Data Error Tooltip for " + e.Column.Key + ": " + e.TooltipText;
			}
			else
			{
				// If the Column is null then the tooltip is being displayed for the 
				// error icon of a row selector.
				e.TooltipText = "Row Data Error Tooltip: " + e.TooltipText;
			}

            // You can conditionally prevent the displaying of the tooltip by setting 
			// the Cancel to true.
			if ( e.TooltipText.Length > 10000 )
			{
				e.Cancel = true;
			}
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, 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

See Also