jQWidgets Forums

jQuery UI Widgets Forums Navigation Tree ParentItem is null

This topic contains 3 replies, has 2 voices, and was last updated by  Hristo 8 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • ParentItem is null #87128

    Pfhoenix
    Participant

    Whenever I do a getItem, the parentItem is always null, even when the item has a parentElement. I’m adding items programmatically with addTo and passing an object (not HTML string). Should parentItem populate, is it unsupported, or am I missing something on initialization?

    ParentItem is null #87150

    Hristo
    Participant

    Hello Pfhoenix,

    It is normal behavior, receive HTML object.
    Please, take a look at this example.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    ParentItem is null #87169

    Pfhoenix
    Participant

    I think you misunderstood what I was asking. I was hoping that parentItem would allow me to avoid calling getItem for every parentElement. Is parentItem ever populated?

    ParentItem is null #87187

    Hristo
    Participant

    Hello Pfhoenix,

    If you would like to check some item has parent or not need to use parentElement property.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.