Search
Control.data Property
See Also
 






Gets or sets an object, holding custom user data.

Namespace: MindFusion.Common
File: Control.js

 Syntax

JavaScript  Copy Code

get data() {}

 Property Value

Object. The custom user data.

 Example

The following code uses the data property in the event handler of the itemDrag event of a TreeView to assign the data of the event sender to a ListItem:

JavaScript  Copy Code
function nodeDrag(sender, args)
{
 if (sender.data)
 {
  var item = new ui.ListItem(sender.title);
  item.data = sender.data;
  listView.acceptDrop = item;
 }
}

 See Also