i have one treeview and 2 button i want when click on UP_button, above Node selected if i am click on DOWN_button then selection should be go down
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
There are some nice built in properties of the node that you can use, so for up you would use:
and for down:
try this for UP:
my problem solved.
thanx for answers
For ASP.NET Treeview:
From MSDN Documentation:
EDIT
You'd of course use the cases for "Previous" and "Next" or "PreviousVisible" and "NextVisible" in your button click handlers. This code assumes that you select the "action" from a combo box and push a button.
EDIT 2
Just in case you are trying to move the nodes up and down (not the selection), you can use something like the following:
This would move the current node one down. Please note that you have to write some more code to handle some special cases (e.g. what happens with the first node? Does it work on all levels of the tree?), but basically that's what I'd try.