Developer forum

Forum » Development » dw:Contextmenu

dw:Contextmenu


Reply

How do I obtain the ID of the treenode, when a user clicks on an item in dw:Contextmenu?

 

/Peter Terkildsen


Replies

 
Reply
Terkildsen wrote:

How do I obtain the ID of the treenode, when a user clicks on an item in dw:Contextmenu?

 

/Peter Terkildsen

Hello Peter

 

Inside your event handler use ContextMenu.callingID (to get the NodeID property) and ContextMenu.callingItemID (to get the ItemID property).

 
Reply
pvo@dynamicsystems.dk wrote:
Terkildsen wrote:

How do I obtain the ID of the treenode, when a user clicks on an item in dw:Contextmenu?

 

/Peter Terkildsen

Hello Peter

 

Inside your event handler use ContextMenu.callingID (to get the NodeID property) and ContextMenu.callingItemID (to get the ItemID property).


 

Ok, so you use this information in the onClick event of the ContextMenuButton? When I do this it says "Tree1" for the ContextMenu.callingID and "Undedefined" for the ContextMenu.callingItemID.

 

Am I missing something here?

 

/Peter

 
Reply
Terkildsen wrote:
pvo@dynamicsystems.dk wrote:
Terkildsen wrote:

How do I obtain the ID of the treenode, when a user clicks on an item in dw:Contextmenu?

 

/Peter Terkildsen

Hello Peter

 

Inside your event handler use ContextMenu.callingID (to get the NodeID property) and ContextMenu.callingItemID (to get the ItemID property).


 

Ok, so you use this information in the onClick event of the ContextMenuButton? When I do this it says "Tree1" for the ContextMenu.callingID and "Undedefined" for the ContextMenu.callingItemID.

 

Am I missing something here?

 

/Peter

Oh, never mind. Figured it out myself. Seems I used an old version of the Dynamicweb files.

 

/Peter

 

You must be logged in to post in the forum