| Name |
Description |
OnNodeSelect
|
Invoked after node was selected.
OnNodeSelect ( id )
id is an identifier of newly selected node.
Example ...
C#
public string OnNodeSelect(string id)
{
return "ID of this selected node is: " + id;
}
VB
Public Function OnNodeSelect(id as String) as String
return "ID of this selected node is: " & id
End Function
|
OnNodeEdit
|
Invoked after node was edited.
OnNodeEdit ( id , text , prevText )
id is a node identifier
text is a new text of a node
prevText is an old text, as a name suggests
Example ...
C#
public string OnNodeEdit(string id, string text, string prevText)
{
return "Node ID: " + id + ". New text: " + text + ". Old Text: " + prevText;
}
VB
Public Function OnNodeEdit(id As String, text As String, prevText As String) As String
return "Node ID: " & id & ". New text: " & text & ". Old Text: " & prevText
End Function
|
OnNodeDrop
|
Invoked after node src was dropped to dst
copy is set to true if src was copied to dst (using CTRL + D-n-d)
OnNodeDrop ( src , dst , copy )
src source node
dst destination node
copy true/false if copy or not
Example ...
C#
public string OnNodeDrop(string src, string dst, bool copy)
{
return "Source: " + src + ". Destination: " + dst + ". Copy: " + copy.ToString();
}
VB
Public Function OnNodeDrop(src As String, dst As String, copy As Boolean) As String
return "Source: " & src & ". Destination: " & dst & ". Copy: " & copy.ToString()
End Function
|
OnAddNode
|
Invoked after node was added
OnAddNode ( parentId , childId , textOrHTML , expanded , image , subTreeURL )
parentId: ID of parent node
childId: Node ID
textOrHTML: Text or HTML to display inside the node
expanded: When True, node is open on load
image: Icon image
subTreeURL: URL to page with tree for loading dynamically
Example ...
C#
public string OnAddNode(string parentId, string childId, string textOrHTML,
bool expanded, string image, string subTreeURL)
{
return "Parent Node ID: " + parentId + ". Node ID: " + childId + ". Text: " + textOrHTML;
}
VB
Public Function OnAddNode(parentId As String, childId As String, textOrHTML As String, _
expanded As Boolean, image As String, subTreeURL As String) As String
return "Parent Node ID: " & parentId & ". Node ID: " & childId & ". Text: " & textOrHTML
End Function
|
OnRemoveNode
|
Invoked after node was removed
OnRemoveNode ( id )
id: id is an identifier of an already removed node
Example ...
C#
public string OnRemoveNode(string id)
{
return "The removed node: " + id;
}
VB
Public Function OnRemoveNode(id As String) As String
return "The removed node: " & id
End Function
|
OnNodeExpand
|
Invoked when a node is expanded
OnNodeExpand ( id , dynamic )
id: id is an identifier the expanded node
dynamic: is set to true if the node is parent for a dynamic subtree
Example ...
C#
public string OnNodeExpand(string id, bool dynamic)
{
return "The node id: " + id;
}
VB
Public Function OnNodeExpand(id As String, dynamic As Boolean) As String
return "The node id: " & id
End Function
|
OnNodeCollapse
|
Invoked when a node is collapsed
OnNodeCollapse ( id )
id: id is an identifier the collapsed node
Example ...
C#
public string OnNodeCollapse(string id)
{
return "The node id: " + id;
}
VB
Public Function OnNodeCollapse(id As String) As String
return "The node id: " & id
End Function
|
OnBeforeNodeEdit
|
Invoked just before user starts to edit a node's text. Return false to prevent editing
OnBeforeNodeEdit ( id )
id: is the id of the edited node
Example ...
C#
public string OnBeforeNodeEdit(string id)
{
return "The node id: " + id;
}
VB
Public Function OnBeforeNodeEdit(id As String) As String
return "The node id: " & id
End Function
|
OnBeforeAddNode
|
Invoked just before Treeview starts to add a node
OnBeforeAddNode ( parentId , childId , textOrHTML , expanded , image , subTreeURL )
parentId: ID of parent node
childId: Node ID
textOrHTML: Text or HTML to display inside the node
expanded: When True, node is open on load
image: Icon image
subTreeURL: URL to page with tree for loading dynamically
Example ...
C#
public string OnBeforeAddNode(string parentId, string childId, string textOrHTML,
bool expanded, string image, string subTreeURL)
{
return "Parent Node ID: " + parentId + ". Node ID: " + childId + ". Text: " + textOrHTML;
}
VB
Public Function OnBeforeAddNode(parentId As String, childId As String, textOrHTML As String, _
expanded As Boolean, image As String, subTreeURL As String) As String
return "Parent Node ID: " & parentId & ". Node ID: " & childId & ". Text: " + textOrHTML
End Function
|
OnBeforeRemoveNode
|
Invoked just before Treeview starts to remove a node
OnBeforeRemoveNode ( id )
id: is the identify of the node to be removed
Example ...
C#
public string OnBeforeRemoveNode(string id)
{
return "The node id: " + id;
}
VB
Public Function OnBeforeRemoveNode(id As String) As String
return "The node id: " & id
End Function
|
OnBeforeNodeDrop
|
Invoked before completing a drag-and-drop operation.
Not invoked when drag-and-drop is not successful for some other reasons.
If CTRL + D-n-d is used for copying src to dst, copy will be true
OnBeforeNodeDrop ( src , dst , copy )
src source node
dst destination node
copy true/false if copy or not
Example ...
C#
public string OnBeforeNodeDrop(string src, string dst, bool copy)
{
return "Source: " + src + ". Destination: " + dst + ". Copy: " + copy.ToString();
}
VB
Public Function OnBeforeNodeDrop(src As String, dst As String, copy As Boolean) As String
return "Source: " & src & ". Destination: " & dst & ". Copy: " & copy.ToString();
End Function
|
OnMoveNodeUp
|
Invoked when a node is moved up
OnMoveNodeUp ( node_up_id , node_down_id )
node_up_id: is the identifier of the moved node
node_down_id: is the identifier of the replaced node
Example ...
C#
public string OnMoveNodeUp(string node_up_id, string node_down_id)
{
return "A node: " + node_down_id + " is replaced by " + node_up_id;
}
VB
Public Function OnMoveNodeUp(node_up_id As String, node_down_id As String) As String
return "A node: " & node_down_id & " is replaced by " & node_up_id;
End Function
|
OnMoveNodeDown
|
Invoked when a node is moved down
OnMoveNodeDown ( node_down_id , node_up_id )
node_down_id: is the identifier of the moved node
node_up_id: is the identifier of the replaced node
Example ...
C#
public string OnMoveNodeUp(string node_down_id, string node_up_id)
{
return "A node: " + node_up_id + " is replaced by " + node_down_id;
}
VB
Public Function OnMoveNodeUp(node_down_id As String, node_up_id As String) As String
return "A node: " & node_up_id & " is replaced by " & node_down_id
End Function
|