jQWidgets Forums

jQuery UI Widgets Forums Navigation Tree Retrieving ID as opposed to text

This topic contains 2 replies, has 3 voices, and was last updated by  josephjmarini 9 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Retrieving ID as opposed to text #83313

    George S
    Participant

    Hello,

    I am considering using a dynamically built jqxTree. The user will click on the various nodes, and my program will subsequently look up other data. The tree will contain hierarchical data, with the text of the nodes being similar or even the same. I would like to associate an ID, such as an integer to each display node, and when the user clicks on a node, actually retrieve that ID value. Is this possible?

    Thanks

    Retrieving ID as opposed to text #83349

    ivailo
    Participant

    Hi George S,

    You can set these fields about each item:

    label – sets the item’s label.
    value – sets the item’s value.
    html – item’s html. The html to be displayed in the item.
    id – sets the item’s id.
    disabled – sets whether the item is enabled/disabled.
    checked – sets whether the item is checked/unchecked(when checkboxes are enabled).
    expanded – sets whether the item is expanded or collapsed.
    selected – sets whether the item is selected.
    items – sets an array of sub items.
    icon – sets the item’s icon(url is expected).
    iconsize – sets the size of the item’s icon.

    In your case you can use value field.

    Here is a demo.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    Retrieving ID as opposed to text #84011

    josephjmarini
    Participant

    So what you are saying is that one could use the value field as a reference to some custom mapping or as a user object.
    However I assume that I could also retrieve the standard attributes of a node as listed above.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.