Getting Started

DropDownList

Grid

TabStrip

TreeView

Window

Comming Soon

  • ComboBox

 

 

addContextMenu

Description

Add a context menu to the treeview.

Sample

$('#MyTreeView').data('tTreeView').addContextMenu({
	evaluateNode: function(treeview, node) {
		nodeValue = treeview.getItemValue(node);
		return (nodeValue == 'editable');
	},
	menuItems: [{
		text: 'Edit',
		onclick: function(e) {
			alert('You Clicked ' + e.item.text() + ' for ' + e.treeview.getItemText(e.node) + ' with a value of ' + e.treeview.getItemValue(e.node));
		}
	}, {
		separator: true
	}, {
		text: 'Delete',
		onclick: function(e) {
			alert('You Clicked ' + e.item.text() + ' for ' + e.treeview.getItemText(e.node) + ' with a value of ' + e.treeview.getItemValue(e.node));
		}
	}]
});
	

Last edited Dec 23, 2011 at 3:18 PM by jddevight, version 3

Comments

No comments yet.