I have a tree with thousands of node when the node is selected it makes a WCF call and loads details.
The user could use the keyboard keep the down key pressed and scroll throught the node it would then end up making thousands of calls and ends up hammering the server.
Is there a way to delay the selection call or change the repeat so it will not hammer the server with WCF calls.
As I started it was an easy fix, doh. I was catching the KeyDown I should be catching the KeyUp event so it will only load when the user has stopped pressing the button.
I am going to try making a queue then before making the call to the server check to see if the tree is still on the current node.
You could remove the key mappings that select the node, but I don't think that is the right approach. You might want to consider triggering an expensive operation like this off (for example) a double-click rather than a selection.