I am using UltraTree of Infragistics 7.3 .
I have registered four events AfterSelect,AfterExpand,KeyDown and MouseDown for tree node
I am doing some processing in AfterSelect event.
While navigating the tree(focus is on any node), When I press 'Down arrow' or 'Up arrow' key, AfterSelect and KeyDown events are getting triggered. I don't want to trigger AfterSelect event when I press 'down ' arrow or ' Up ' arrow key.
When I press 'enter' key while the focus is on any node, AfterSelect event should be triggered.
I feel that you've asked the question in the wrong forum, this is the right one:
http://forums.infragistics.com/forums/134.aspx
This is the Windows Forms forum, so this is the right place if the question is about the Windows Forms tree.
The AfterSelect event fires when the node is selected, regardless of how it got selected (i.e., by keyboard, mouse, or programmatically). The by-design behavior for the control is to select a node when it is navigated to via an arrow key, unless the control key is pressed, in which case it activates the node but does not select it. This is based on standard Windows UI behavior. The solution to your problem might be to set the UltraTree.Override.SelectionType to 'None', and then handle the KeyDown event and programatically select the ActiveNode (using the UltraTreeNode.Selected property). If you took this approach, you would also have to handle selection by mouse, i.e., handle the control's MouseDown event and use GetNodeFromPoint to find the node at the cursor position and select it.