Infragistics2.Win.UltraWinTree.v8.1
BeforeCellActivate Event
See Also  Example
Infragistics.Win.UltraWinTree Namespace > UltraTree Class : BeforeCellActivate Event

Occurs before an UltraTreeNodeCell is activated.

Syntax

Visual Basic (Declaration) 
Public Event BeforeCellActivate() As BeforeCellActivateEventHandler
C# 
public event BeforeCellActivateEventHandler BeforeCellActivate()

Example

The following code sample demonstrates how to prevent the activation of a cell based on the containing node's level and the key of the associated column:

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.

Visual BasicCopy Code
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTree

    Private Sub UltraTree1_BeforeCellActivate(ByVal sender As Object, ByVal e As BeforeCellActivateEventArgs) Handles ultraTree1.BeforeCellActivate
        If e.Node.Level > 0 AndAlso e.Column.Key = "ID" Then
            e.Cancel = True
        End If
    End Sub
C#Copy Code
using Infragistics.Win;
using Infragistics.Win.UltraWinTree;
using System.Diagnostics;

       
private void ultraTree1_BeforeCellActivate(object sender, Infragistics.Win.UltraWinTree.BeforeCellActivateEventArgs e)
       {
           
if ( e.Node.Level > 0 && e.Column.Key == "ID" )
               e.Cancel = true;
       }

See Also