I just want to access one element and if i hit enter it will check but i am getting them all checked...I know i am saying "for each" node in the list but i just want it to be one item in the list to be checked when i hit enter....what should i do a lil lost!

For Each??? Questions
Vincent Josset
Jeff Ulrich
use the afterselect event or you can use the selectednode property....
lorijean44
This is the exception i get....
An unhandled exception of type 'System.NullReferenceException' occurred in Tracker.exe
Additional information: Object reference not set to an instance of an object.
ChrisTullier
Chad Bumstead
Thanks i actually got it to work doing it like so.......
Dim rNode As Infragistics.Win.UltraWinTree.UltraTreeNode For Each rNode In UltRepairCodes.SelectedNodes If e.KeyCode = Keys.Enter Then rNode.CheckedState = CheckState.Checked NextDavid Pinero
The Infragistics controls are all extensions of the base controls for the most part so they have pretty much all of the same properties and methods.
The reason you're getting the error is you are declaring rNode but you're not setting to anything before you try to change a property. Try something like this, get rid of rNode altogether:
if e.KeyCode = Keys.Enter And sender.ActiveNode IsNot Nothing Then
sender.ActiveNode.CheckedState = CheckState.Checked
End If