jQWidgets Forums

jQuery UI Widgets Forums Navigation Tree Set value property of li

This topic contains 4 replies, has 2 voices, and was last updated by  plgeda 11 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Set value property of li #27447

    plgeda
    Participant

    Hi,

    I could able to set id and label of a li html element when the time of adding a new tree node..

    here is my code.

    $('#Add').click(function () {
    var selectedItem = $('#jqxTree').jqxTree('selectedItem');
    if (selectedItem != null) {
    $('#jqxTree').jqxTree('addTo', { label: 'Item' , id:'2'}, selectedItem.element, false);
    $('#jqxTree').jqxTree('render');
    }
    });

    Now i want to set value property for li when the of adding a new node of jqwidgets tree.

    My Question is how can i set value propery of li html element when the time of adding a new node or item?.

    is it possible?.I want to implement something like this.

    $('#jqxTree').jqxTree('addTo', { label: 'Item' ,id:'1',value:'12'}, selectedItem.element, false);

    Thanks,

    Set value property of li #27456

    Peter Stoev
    Keymaster

    Hi rememberlijo,

    $(‘#jqxTree’).jqxTree(‘addTo’, { label: ‘Item’ ,id:’1′,value:’12’}, selectedItem.element, false); is a valid code. That will set the value.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Set value property of li #27457

    plgeda
    Participant

    Ok thnk you Peter Stoev..

    Set value property of li #27680

    plgeda
    Participant

    I have one more doubt..

    I am creating a dynamic tree in JSON, how I can insert and remove items (parent nodes and child nodes). I am using the the same structure of the data object mentioned in examples.

    Thanks’

    Set value property of li #27690

    plgeda
    Participant

    OK thanks,I fixed it..

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

You must be logged in to reply to this topic.